webRTCConn close as part of its reset, instead of depending on external deferred close after receiving reset channel, allows valid disconnections even before use

This commit is contained in:
Serene Han 2016-03-29 22:28:52 -07:00 committed by Arlo Breault
parent bc1a499bc8
commit 1d1882b59d
2 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ import (
var ptInfo pt.ClientInfo
const (
ReconnectTimeout = 5
ReconnectTimeout = 10
SnowflakeCapacity = 3
)
@ -109,7 +109,6 @@ func handler(conn *pt.SocksConn) error {
conn.Reject()
return errors.New("handler: Received invalid Snowflake")
}
defer remote.Close()
defer conn.Close()
log.Println("handler: Snowflake assigned.")