Browse Source

staticClient.connect(): don't handshake twice (fixes #2547, #2548)

The first handshake occurred before setting the Deadline, which could
cause an unintended hang.
Antony Male 10 years ago
parent
commit
345d727936
1 changed files with 0 additions and 3 deletions
  1. 0 3
      lib/relay/client/static.go

+ 0 - 3
lib/relay/client/static.go

@@ -200,9 +200,6 @@ func (c *staticClient) connect() error {
 	c.mut.Unlock()
 
 	conn := tls.Client(tcpConn, c.config)
-	if err = conn.Handshake(); err != nil {
-		return err
-	}
 
 	if err := conn.SetDeadline(time.Now().Add(c.connectTimeout)); err != nil {
 		conn.Close()