Merge pull request #2550 from canton7/feature/deadline

staticClient.connect(): don't handshake twice (fixes #2547, #2548)
This commit is contained in:
Audrius Butkevicius 2015-12-04 12:05:28 +00:00
commit 38e9b92c42
1 changed files with 0 additions and 3 deletions

View File

@ -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()