TUN-1847: Log a distinct message when OpenStream fails while waiting for response headers
This commit is contained in:
parent
fa17b0200f
commit
6f8708d33c
|
@ -20,10 +20,11 @@ var (
|
||||||
ErrUnknownStream = MuxerProtocolError{"2002 unknown stream", http2.ErrCodeProtocol}
|
ErrUnknownStream = MuxerProtocolError{"2002 unknown stream", http2.ErrCodeProtocol}
|
||||||
ErrInvalidStream = MuxerProtocolError{"2003 invalid stream", http2.ErrCodeProtocol}
|
ErrInvalidStream = MuxerProtocolError{"2003 invalid stream", http2.ErrCodeProtocol}
|
||||||
|
|
||||||
ErrStreamHeadersSent = MuxerApplicationError{"3000 headers already sent"}
|
ErrStreamHeadersSent = MuxerApplicationError{"3000 headers already sent"}
|
||||||
ErrConnectionClosed = MuxerApplicationError{"3001 connection closed"}
|
ErrConnectionClosed = MuxerApplicationError{"3001 connection closed"}
|
||||||
ErrConnectionDropped = MuxerApplicationError{"3002 connection dropped"}
|
ErrConnectionDropped = MuxerApplicationError{"3002 connection dropped"}
|
||||||
ErrOpenStreamTimeout = MuxerApplicationError{"3003 open stream timeout"}
|
ErrOpenStreamTimeout = MuxerApplicationError{"3003 open stream timeout"}
|
||||||
|
ErrResponseHeadersTimeout = MuxerApplicationError{"3004 timeout waiting for initial response headers"}
|
||||||
|
|
||||||
ErrClosedStream = MuxerStreamError{"4000 stream closed", http2.ErrCodeStreamClosed}
|
ErrClosedStream = MuxerStreamError{"4000 stream closed", http2.ErrCodeStreamClosed}
|
||||||
)
|
)
|
||||||
|
|
|
@ -201,9 +201,9 @@ func Handshake(
|
||||||
initialStreamWindow: m.config.DefaultWindowSize,
|
initialStreamWindow: m.config.DefaultWindowSize,
|
||||||
streamWindowMax: m.config.MaxWindowSize,
|
streamWindowMax: m.config.MaxWindowSize,
|
||||||
streamWriteBufferMaxLen: m.config.StreamWriteBufferMaxLen,
|
streamWriteBufferMaxLen: m.config.StreamWriteBufferMaxLen,
|
||||||
r: m.r,
|
r: m.r,
|
||||||
metricsUpdater: m.muxMetricsUpdater,
|
metricsUpdater: m.muxMetricsUpdater,
|
||||||
bytesRead: inBoundCounter,
|
bytesRead: inBoundCounter,
|
||||||
}
|
}
|
||||||
m.muxWriter = &MuxWriter{
|
m.muxWriter = &MuxWriter{
|
||||||
f: m.f,
|
f: m.f,
|
||||||
|
@ -406,7 +406,7 @@ func (m *Muxer) OpenStream(ctx context.Context, headers []Header, body io.Reader
|
||||||
|
|
||||||
select {
|
select {
|
||||||
case <-ctx.Done():
|
case <-ctx.Done():
|
||||||
return nil, ErrOpenStreamTimeout
|
return nil, ErrResponseHeadersTimeout
|
||||||
case <-m.abortChan:
|
case <-m.abortChan:
|
||||||
return nil, ErrConnectionClosed
|
return nil, ErrConnectionClosed
|
||||||
case <-stream.responseHeadersReceived:
|
case <-stream.responseHeadersReceived:
|
||||||
|
|
Loading…
Reference in New Issue