mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-06-17 06:35:07 +03:00
Differentiate between incoming and outgoing conn
This commit is contained in:
parent
cacad8220e
commit
f8334c06ff
1 changed files with 8 additions and 1 deletions
|
@ -169,7 +169,14 @@ func (intf *link) handler() (chan struct{}, error) {
|
|||
return nil, errors.New("failed to decode metadata")
|
||||
}
|
||||
if !meta.check() {
|
||||
intf.links.core.log.Debugf("Rejected incoming connection: %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…
Add table
Add a link
Reference in a new issue