Closed
Description
- Version: master
- Platform: N/A
- Subsystem: http2
I came across this issue while writing unit tests for req.close(code)
in PR #18854
The function currently checks if callback is valid after performing close operation
node/lib/internal/http2/core.js
Lines 1760 to 1764 in 472cde6
In other functions (for example ping()
, settings()
etc) the validity for callback is checked before function performs it's operation:
node/lib/internal/http2/core.js
Lines 954 to 955 in 472cde6
node/lib/internal/http2/core.js
Lines 1044 to 1045 in 472cde6
Is there a reason why req.close(code)
performs close operation even if callback is invalid?