Merge pull request #656 from milosgajdos83/tun-listener

Close the tunnel listener when the tunnel is cloed.
This commit is contained in:
Asim Aslam
2019-08-08 15:25:19 +01:00
committed by GitHub
3 changed files with 10 additions and 0 deletions

View File

@@ -430,6 +430,8 @@ func (t *tun) Listen(addr string) (Listener, error) {
accept: make(chan *socket, 128),
// the channel to close
closed: make(chan bool),
// tunnel closed channel
tunClosed: t.closed,
// the connection
conn: c,
// the listener socket