send message once after creating socket
This commit is contained in:
parent
d0d729a789
commit
01cb146e0d
@ -53,14 +53,12 @@ func (t *tunListener) process() {
|
|||||||
|
|
||||||
// save the socket
|
// save the socket
|
||||||
conns[m.session] = sock
|
conns[m.session] = sock
|
||||||
sock.recv <- m
|
|
||||||
|
|
||||||
// send to accept chan
|
// send to accept chan
|
||||||
select {
|
select {
|
||||||
case <-t.closed:
|
case <-t.closed:
|
||||||
return
|
return
|
||||||
case t.accept <- sock:
|
case t.accept <- sock:
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user