mirror of
https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git
synced 2025-10-13 11:11:30 -04:00
Allow handling multiple SOCKS connections simultaneously.
Close the SOCKS connection in the same function that opens it.
This commit is contained in:
parent
20ac2029fd
commit
dfb83c6606
2 changed files with 7 additions and 5 deletions
|
@ -25,7 +25,6 @@ func Handler(socks SocksConnector, snowflakes SnowflakeCollector) error {
|
|||
|
||||
return errors.New("handler: Received invalid Snowflake")
|
||||
}
|
||||
defer socks.Close()
|
||||
defer snowflake.Close()
|
||||
log.Println("---- Handler: snowflake assigned ----")
|
||||
err := socks.Grant(&net.TCPAddr{IP: net.IPv4zero, Port: 0})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue