A potential race exists between a server sending a GOAWAY frame and a client opening a new stream (i.e., sending a HEADERS frame before receiving an already sent GOAWAY frame). If there are no open streams when the server sends the GOAWAY frame, the connection state on the server transitions to being fully quiesced, which throws a connection error on receipt of a HEADERS frame.
Modifications:
Adjust the connection state machine on the server to throw a stream error (instead of a connection error), and consequently, send a RST_STREAM frame to the client.
Result:
This condition will be treated as a stream-level error instead.
Motivation:
A potential race exists between a server sending a GOAWAY frame and a client opening a new stream (i.e., sending a HEADERS frame before receiving an already sent GOAWAY frame). If there are no open streams when the server sends the GOAWAY frame, the connection state on the server transitions to being fully quiesced, which throws a connection error on receipt of a HEADERS frame.
Modifications:
Result:
This condition will be treated as a stream-level error instead.