From 345d727936932a09ce322ccf78619969206d4391 Mon Sep 17 00:00:00 2001 From: Antony Male Date: Fri, 4 Dec 2015 11:18:58 +0000 Subject: [PATCH] staticClient.connect(): don't handshake twice (fixes #2547, #2548) The first handshake occurred before setting the Deadline, which could cause an unintended hang. --- lib/relay/client/static.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/relay/client/static.go b/lib/relay/client/static.go index d56a9a318..f929530f2 100644 --- a/lib/relay/client/static.go +++ b/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()