4
0
mirror of https://github.com/cwinfo/yggdrasil-go.git synced 2025-06-15 15:36:06 +00:00

Make message clearer and downgrade (#812)

* Make message clearer and downgrade

* Differentiate between incoming and outgoing conn
This commit is contained in:
Tom
2022-01-30 22:58:57 +01:00
committed by GitHub
parent 620b901473
commit 9f5cc0eecb

View File

@ -185,7 +185,14 @@ func (intf *link) handler() (chan struct{}, error) {
return nil, errors.New("failed to decode metadata")
}
if !meta.check() {
intf.links.core.log.Errorf("Failed to connect to node: %s is incompatible version (local %s, remote %s)",
var connectError string
if intf.incoming {
connectError = "Rejected incoming connection"
} else {
connectError = "Failed to connect"
}
intf.links.core.log.Debugf("%s: %s is incompatible version (local %s, remote %s)",
connectError,
intf.lname,
fmt.Sprintf("%d.%d", base.ver, base.minorVer),
fmt.Sprintf("%d.%d", meta.ver, meta.minorVer),