8000 http2: add SETTINGS_ENABLE_CONNECT_PROTOCOL support by WeidiDeng · Pull Request #221 · golang/net · GitHub
[go: up one dir, main page]

Skip to content

http2: add SETTINGS_ENABLE_CONNECT_PROTOCOL support #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Prev Previous commit
Next Next commit
don't try to send to reqHeaderMu when waiting for extended connect
  • Loading branch information
WeidiDeng committed Nov 22, 2024
commit 23eded455f9b85f416e88c54c69c3120f2550ee8
16 changes: 7 additions & 9 deletions http2/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,6 @@ func (cs *clientStream) writeRequest(req *http.Request, streamf func(*clientStre
}
if isExtendedConnect {
select {
case cc.reqHeaderMu <- struct{}{}:
case <-cs.reqCancel:
return errRequestCanceled
case <-ctx.Done():
Expand All @@ -1421,14 +1420,13 @@ func (cs *clientStream) writeRequest(req *http.Request, streamf func(*clientStre
return errExtendedConnectNotSupported
}
}
} else {
select {
case cc.reqHeaderMu <- struct{}{}:
case <-cs.reqCancel:
return errRequestCanceled
case <-ctx.Done():
return ctx.Err()
}
}
select {
case cc.reqHeaderMu <- struct{}{}:
case <-cs.reqCancel:
return errRequestCanceled
case <-ctx.Done():
return ctx.Err()
}

cc.mu.Lock()
Expand Down
0