The first handshake occurred before setting the Deadline, which could cause an unintended hang.
This commit is contained in:
parent
86e8e5199e
commit
345d727936
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user