mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 20:11:19 -04:00
Ensure turbotunnel read and write loop terminate
Introduce a waitgroup and done channel to ensure that both the read and write gorouting for turbotunnel connections terminate when the connection is closed.
This commit is contained in:
parent
11f0846264
commit
7c9005bed3
2 changed files with 27 additions and 14 deletions
|
@ -140,5 +140,6 @@ func (inner *clientMapInner) Pop() interface{} {
|
|||
inner.byAge = inner.byAge[:n-1]
|
||||
// Remove from byAddr map.
|
||||
delete(inner.byAddr, record.Addr)
|
||||
close(record.SendQueue)
|
||||
return record
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue