mirror of
https://github.com/yggdrasil-network/yggdrasil-go
synced 2024-11-13 00:40:24 +03:00
Update debug lines in link.go
This commit is contained in:
parent
1a3a67f205
commit
2466c54a71
@ -51,7 +51,7 @@ func (l *link) init(c *Core) error {
|
|||||||
l.mutex.Unlock()
|
l.mutex.Unlock()
|
||||||
|
|
||||||
if err := l.awdl.init(l); err != nil {
|
if err := l.awdl.init(l); err != nil {
|
||||||
l.core.log.Println("Failed to start AWDL interface")
|
l.core.log.Errorln("Failed to start AWDL interface")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ func (intf *linkInterface) handler() error {
|
|||||||
}
|
}
|
||||||
base := version_getBaseMetadata()
|
base := version_getBaseMetadata()
|
||||||
if meta.ver > base.ver || meta.ver == base.ver && meta.minorVer > base.minorVer {
|
if meta.ver > base.ver || meta.ver == base.ver && meta.minorVer > base.minorVer {
|
||||||
intf.link.core.log.Println("Failed to connect to node: " + intf.name + " version: " + fmt.Sprintf("%d.%d", meta.ver, meta.minorVer))
|
intf.link.core.log.Errorln("Failed to connect to node: " + intf.name + " version: " + fmt.Sprintf("%d.%d", meta.ver, meta.minorVer))
|
||||||
return errors.New("failed to connect: wrong version")
|
return errors.New("failed to connect: wrong version")
|
||||||
}
|
}
|
||||||
// Check if we already have a link to this node
|
// Check if we already have a link to this node
|
||||||
@ -109,7 +109,7 @@ func (intf *linkInterface) handler() error {
|
|||||||
intf.link.mutex.Unlock()
|
intf.link.mutex.Unlock()
|
||||||
// FIXME we should really return an error and let the caller block instead
|
// FIXME we should really return an error and let the caller block instead
|
||||||
// That lets them do things like close connections on its own, avoid printing a connection message in the first place, etc.
|
// That lets them do things like close connections on its own, avoid printing a connection message in the first place, etc.
|
||||||
intf.link.core.log.Println("DEBUG: found existing interface for", intf.name)
|
intf.link.core.log.Debugln("DEBUG: found existing interface for", intf.name)
|
||||||
intf.msgIO.close()
|
intf.msgIO.close()
|
||||||
<-oldIntf.closed
|
<-oldIntf.closed
|
||||||
return nil
|
return nil
|
||||||
@ -122,7 +122,7 @@ func (intf *linkInterface) handler() error {
|
|||||||
intf.link.mutex.Unlock()
|
intf.link.mutex.Unlock()
|
||||||
close(intf.closed)
|
close(intf.closed)
|
||||||
}()
|
}()
|
||||||
intf.link.core.log.Println("DEBUG: registered interface for", intf.name)
|
intf.link.core.log.Debugln("DEBUG: registered interface for", intf.name)
|
||||||
}
|
}
|
||||||
intf.link.mutex.Unlock()
|
intf.link.mutex.Unlock()
|
||||||
// Create peer
|
// Create peer
|
||||||
|
Loading…
Reference in New Issue
Block a user