BUG/MINOR: mux-h2: do not send GOAWAY if SETTINGS were not sent

It was reported in issue #13 that a GOAWAY frame was sent on timeout even
if no SETTINGS frame was sent. The approach imagined by then was to track
the fact that a SETTINGS frame was already sent to avoid this, but that's
already what is done through the state, though it doesn't stand due to the
fact that we switch the frame to the error state. Thus instead what we're
doing here is to instead set the GOAWAY_FAILED flag in h2c_error() before
switching to the ERROR state when the state indicates we've not yet sent
settings, and refrain from sending anything from the h2c_send_goaway_error()
function for such states.

This could be backported to all versions where it applies well.

(cherry picked from commit 15dbedd63d88308d7a84bc66b17c579af962b823)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
(cherry picked from commit 7691a0fb1f46a528128c913546f536828da54969)
Signed-off-by: Christopher Faulet <cfaulet@haproxy.com>
1 file changed