Skip to content

http2: improve nghttp2 error callback

The http2 implementation uses the deprecated function nghttp2_session_callbacks_set_error_callback, which does not supply an error code but only an error message. This so far forced node's error callback to rely on the error message in order to distinguish between different errors, which is fragile and inefficient.

Use the newer nghttp2_session_callbacks_set_error_callback2 function instead, which is not deprecated and which provides the exact error code to node's error callback.

Merge request reports

Loading