Archived
The first handshake occurred before setting the Deadline, which could cause an unintended hang.
This commit is contained in:
1 parent
86e8e5199e
commit
345d727936
1 file changed
-3
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user