From 93d66afe8c22513d6915569ae9b2ee1718326381 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Sun, 1 Dec 2019 19:43:36 +0000 Subject: [PATCH] fix that broken logic --- tunnel/default.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tunnel/default.go b/tunnel/default.go index 1a3e3c35..16ab2e59 100644 --- a/tunnel/default.go +++ b/tunnel/default.go @@ -519,11 +519,13 @@ func (t *tun) listen(link *link) { // assuming there's a channel and session // try get the dialing socket s, exists := t.getSession(channel, sessionId) - if exists && s.mode == Unicast && !loopback { - // only delete this if its unicast - // but not if its a loopback conn - t.delSession(channel, sessionId) - continue + if exists && !loopback { + if s.mode == Unicast { + // only delete this if its unicast + // but not if its a loopback conn + t.delSession(channel, sessionId) + continue + } } // otherwise its a session mapping of sorts case "keepalive":