We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a97030c commit b3e9764Copy full SHA for b3e9764
websocket.go
@@ -201,7 +201,7 @@ func (c *Conn) timeoutLoop() {
201
parentCtx := context.Background()
202
cancelCtx := func() {}
203
defer func() {
204
- // We do not defer cancelCtx because its value can change.
+ // We do not defer cancelCtx directly because its value may change.
205
cancelCtx()
206
}()
207
@@ -224,9 +224,6 @@ func (c *Conn) timeoutLoop() {
224
select {
225
case <-c.closed:
226
return
227
- case <-parentCtx.Done():
228
- c.close(xerrors.Errorf("parent context cancelled: %w", parentCtx.Err()))
229
- return
230
case c.getConnContext <- ctx:
231
}
232
0 commit comments