Closed as not planned
Closed as not planned
Description
Hello, reporting an issue here:
Context
We indirectly depend on this package through the graphite
package. As of Node 15.0.0, the client is unable to reconnect on abrupt terminations by the graphite server.
Reproduction
Fortunately, no reproduction is necessary. An existing test fails in both Node 15.0.0 and 16.0.0:
node:assert:399
throw err;
^
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
assert.ok(!err)
at /Users/jsamines/dev/personal/node-lazy-socket/test/integration/test-connection-interrupt.js:49:12
at cbProxy (/Users/jsamines/dev/personal/node-lazy-socket/lib/LazySocket.js:37:17)
at processTicksAndRejections (node:internal/process/task_queues:82:21) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
Suggested solution
Node 15 includes a number of semver-major changes to both the stream and net packages, but I suspect nodejs/node#31806 is the one causing issues here, as the error
event is no longer emitted when the socket is abruptly terminated by the server. Adding an end
handler seems to fix the issue, though I am not certain is the correct solution.
Metadata
Metadata
Assignees
Labels
No labels