mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-22 03:40:28 +00:00
Make message clearer and downgrade (#812)
* Make message clearer and downgrade * Differentiate between incoming and outgoing conn
This commit is contained in:
parent
620b901473
commit
9f5cc0eecb
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user