forked from quic-go/quic-go
use a chan instead of a context in Connection.HandshakeComplete (#3709)
This commit is contained in:
@@ -266,7 +266,7 @@ func (c *client) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Respon
|
||||
} else {
|
||||
// wait for the handshake to complete
|
||||
select {
|
||||
case <-conn.HandshakeComplete().Done():
|
||||
case <-conn.HandshakeComplete():
|
||||
case <-req.Context().Done():
|
||||
return nil, req.Context().Err()
|
||||
}
|
||||
@@ -449,7 +449,7 @@ func (c *client) HandshakeComplete() bool {
|
||||
return false
|
||||
}
|
||||
select {
|
||||
case <-(*conn).HandshakeComplete().Done():
|
||||
case <-(*conn).HandshakeComplete():
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user