5
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2024-11-28 21:01:36 +00:00
This commit is contained in:
Arceliar 2018-02-09 18:50:03 -06:00
parent d424489329
commit 869997e4c5

View File

@ -84,9 +84,12 @@ func (n *node) init(cfg *nodeConfig, logger *log.Logger) {
for {
for _, p := range cfg.Peers {
switch {
case len(p) >= 4 && p[:4] == "udp:": n.core.DEBUG_maybeSendUDPKeys(p[4:])
case len(p) >= 4 && p[:4] == "tcp:": n.core.DEBUG_addTCPConn(p[4:])
default: n.core.DEBUG_addTCPConn(p)
case len(p) >= 4 && p[:4] == "udp:":
n.core.DEBUG_maybeSendUDPKeys(p[4:])
case len(p) >= 4 && p[:4] == "tcp:":
n.core.DEBUG_addTCPConn(p[4:])
default:
n.core.DEBUG_addTCPConn(p)
}
time.Sleep(time.Second)
}