back to goroutine and added lock for get handshake
This commit is contained in:
@@ -247,10 +247,10 @@ func (rc *RecConn) Dial(urlStr string, reqHeader http.Header) {
|
|||||||
rc.setDefaultDialer()
|
rc.setDefaultDialer()
|
||||||
|
|
||||||
// Connect
|
// Connect
|
||||||
rc.connect()
|
go rc.connect()
|
||||||
|
|
||||||
// wait on first attempt
|
// wait on first attempt
|
||||||
time.Sleep(rc.HandshakeTimeout)
|
time.Sleep(rc.getHandshakeTimeout())
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetURL returns current connection url
|
// GetURL returns current connection url
|
||||||
|
|||||||
Reference in New Issue
Block a user