Repository navigation
fix(net): clean up synchronous connection failures - #10128
Conversation
Node.js validates some TCP and IPC connection options synchronously before a socket emits any lifecycle event. Those failures bypassed tracer cleanup and retained listeners plus a nested emit wrapper on every retry. Clean up only the current attempt before rethrowing the original error, and leave caller-owned listeners, callback identity, and the previous emit implementation unchanged.
Overall package sizeSelf size: 8.74 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.4.0 | 127.33 kB | 447.04 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
🎉 All green!🧪 All tests passed 🎯 Code Coverage (details) 🔗 Commit SHA: eebbe00 | Docs | View more details | Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10128 +/- ##
==========================================
- Coverage 98.63% 98.62% -0.01%
==========================================
Files 1002 1002
Lines 154897 154894 -3
Branches 13358 13358
==========================================
- Hits 152779 152765 -14
- Misses 2118 2129 +11 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
BenchmarksBenchmark execution time: 2026-09-03 15:14:30 Comparing candidate commit eebbe00 in PR branch Found 3 performance improvements and 0 performance regressions! Performance is the same for 2307 metrics, 18 unstable metrics.
|
The restoration assignment owns no state or lifecycle, so keeping it in a helper obscured the existing connection branches. Inline the assignment at each branch while preserving the accepted own-property contract.
* fix(net): clean up synchronous connection failures Node.js validates some TCP and IPC connection options synchronously before a socket emits any lifecycle event. Those failures bypassed tracer cleanup and retained listeners plus a nested emit wrapper on every retry. Clean up only the current attempt before rethrowing the original error, and leave caller-owned listeners, callback identity, and the previous emit implementation unchanged. * refactor(net): inline socket emit restoration The restoration assignment owns no state or lifecycle, so keeping it in a helper obscured the existing connection branches. Inline the assignment at each branch while preserving the accepted own-property contract.
* fix(net): clean up synchronous connection failures Node.js validates some TCP and IPC connection options synchronously before a socket emits any lifecycle event. Those failures bypassed tracer cleanup and retained listeners plus a nested emit wrapper on every retry. Clean up only the current attempt before rethrowing the original error, and leave caller-owned listeners, callback identity, and the previous emit implementation unchanged. * refactor(net): inline socket emit restoration The restoration assignment owns no state or lifecycle, so keeping it in a helper obscured the existing connection branches. Inline the assignment at each branch while preserving the accepted own-property contract.
* fix(net): clean up synchronous connection failures Node.js validates some TCP and IPC connection options synchronously before a socket emits any lifecycle event. Those failures bypassed tracer cleanup and retained listeners plus a nested emit wrapper on every retry. Clean up only the current attempt before rethrowing the original error, and leave caller-owned listeners, callback identity, and the previous emit implementation unchanged. * refactor(net): inline socket emit restoration The restoration assignment owns no state or lifecycle, so keeping it in a helper obscured the existing connection branches. Inline the assignment at each branch while preserving the accepted own-property contract.
* fix(net): clean up synchronous connection failures Node.js validates some TCP and IPC connection options synchronously before a socket emits any lifecycle event. Those failures bypassed tracer cleanup and retained listeners plus a nested emit wrapper on every retry. Clean up only the current attempt before rethrowing the original error, and leave caller-owned listeners, callback identity, and the previous emit implementation unchanged. * refactor(net): inline socket emit restoration The restoration assignment owns no state or lifecycle, so keeping it in a helper obscured the existing connection branches. Inline the assignment at each branch while preserving the accepted own-property contract.
Node.js validates some TCP and IPC connection options synchronously before a socket emits any lifecycle event. Those failures bypassed tracer cleanup and retained listeners plus a nested
emitwrapper on every retry.Clean up only the current attempt before rethrowing the original error, and leave caller-owned listeners, callback identity, and the previous
emitimplementation unchanged.