Commit 9186f3a
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.
PR-URL: #47840
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>1 parent cf8845d commit 9186f3a
2 files changed
+8
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
437 | 437 | | |
438 | 438 | | |
439 | 439 | | |
440 | | - | |
441 | | - | |
| 440 | + | |
442 | 441 | | |
443 | 442 | | |
444 | 443 | | |
| |||
1257 | 1256 | | |
1258 | 1257 | | |
1259 | 1258 | | |
1260 | | - | |
1261 | | - | |
1262 | | - | |
1263 | | - | |
1264 | 1259 | | |
1265 | 1260 | | |
1266 | 1261 | | |
| 1262 | + | |
1267 | 1263 | | |
1268 | 1264 | | |
1269 | 1265 | | |
1270 | 1266 | | |
1271 | 1267 | | |
1272 | 1268 | | |
1273 | 1269 | | |
1274 | | - | |
| 1270 | + | |
1275 | 1271 | | |
1276 | 1272 | | |
1277 | 1273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
843 | 843 | | |
844 | 844 | | |
845 | 845 | | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
| 850 | + | |
851 | 851 | | |
852 | 852 | | |
853 | 853 | | |
| |||
0 commit comments