add skip on error
This commit is contained in:
parent
5881826936
commit
f8f7d0b0c7
@ -519,8 +519,10 @@ func ParseDump(buf []byte) *Conf {
|
|||||||
iface = new(Interface)
|
iface = new(Interface)
|
||||||
|
|
||||||
iface.PrivateKey = []byte(values[0])
|
iface.PrivateKey = []byte(values[0])
|
||||||
port, _ = strconv.ParseUint(values[2], 10, 32)
|
port, err = strconv.ParseUint(values[2], 10, 32)
|
||||||
|
if err == nil {
|
||||||
iface.ListenPort = uint32(port)
|
iface.ListenPort = uint32(port)
|
||||||
|
}
|
||||||
|
|
||||||
c.Interface = iface
|
c.Interface = iface
|
||||||
// Next lines are Peers
|
// Next lines are Peers
|
||||||
@ -549,9 +551,11 @@ func ParseDump(buf []byte) *Conf {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if values[7] != dumpOff {
|
if values[7] != dumpOff {
|
||||||
i, _ = strconv.Atoi(values[7])
|
i, err = strconv.Atoi(values[7])
|
||||||
|
if err == nil {
|
||||||
peer.PersistentKeepalive = i
|
peer.PersistentKeepalive = i
|
||||||
}
|
}
|
||||||
|
}
|
||||||
c.Peers = append(c.Peers, peer)
|
c.Peers = append(c.Peers, peer)
|
||||||
peer = nil
|
peer = nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user