fix that broken logic

This commit is contained in:
Asim Aslam 2019-12-01 19:43:36 +00:00
parent c840cee404
commit 93d66afe8c

View File

@ -519,12 +519,14 @@ func (t *tun) listen(link *link) {
// assuming there's a channel and session // assuming there's a channel and session
// try get the dialing socket // try get the dialing socket
s, exists := t.getSession(channel, sessionId) s, exists := t.getSession(channel, sessionId)
if exists && s.mode == Unicast && !loopback { if exists && !loopback {
if s.mode == Unicast {
// only delete this if its unicast // only delete this if its unicast
// but not if its a loopback conn // but not if its a loopback conn
t.delSession(channel, sessionId) t.delSession(channel, sessionId)
continue continue
} }
}
// otherwise its a session mapping of sorts // otherwise its a session mapping of sorts
case "keepalive": case "keepalive":
log.Debugf("Tunnel link %s received keepalive", link.Remote()) log.Debugf("Tunnel link %s received keepalive", link.Remote())