Skip to content

Commit

Permalink
fix that broken logic
Browse files Browse the repository at this point in the history
  • Loading branch information
asim committed Dec 1, 2019
1 parent c840cee commit 93d66af
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tunnel/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 93d66af

Please sign in to comment.