]> git.ipfire.org Git - thirdparty/knot-resolver.git/commit
daemon/http: improve handling of stream errors
authorTomas Krizek <tomas.krizek@nic.cz>
Thu, 1 Apr 2021 15:04:10 +0000 (17:04 +0200)
committerLukáš Ježek <lukas.jezek@nic.cz>
Fri, 16 Apr 2021 09:08:56 +0000 (11:08 +0200)
commit2cdec753ca46248cea97eb65d33e812ea68f919c
tree298477138b5b97be5733411c5a3c0e6392ce3279
parentc8cb9740f8ebd34219c7d860106969fcbb6c7bf6
daemon/http: improve handling of stream errors

The on_frame_recv() callback ins't guaranteed to be called by nghttp2.
This can happen e.g. in a case when nghttp2 issues a PROTOCOL_ERROR
RST_STREAM frame. Previously, it would leave the connection in a
stream-processing state, making it completely useless.

While this guarantees a cleanup will be called eventually, some streams
may still get ignored due to the order of various callbacks and data
processing procedures. Still, it's better than the previous
implementation.
daemon/http.c