rhea-promise
rhea-promise copied to clipboard
AwaitableSender: error if connection is lost while sending a message
Describe the bug
Error if connection is lost (ConnectionEvents.disconnected) while sending(AwaitableSender.send()) a message.
Log:
[2023-12-05T08:42:37.775Z] DEBUG message 9f21de77-7abd-4849-a2d2-a3f4c025c59e is sending…
[2023-12-05T08:42:42.019Z] INFO connection 'connection-1' disconnected. Error: read
ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:209:20) {
errno: -4077,
code: 'ECONNRESET',
syscall: 'read'
}
TypeError: Cannot read property 'address' of undefined
at AwaitableSender.get address [as address] (\node_modules\rhea-promise\dist\lib\link.js:63:28)
at Timeout._onTimeout (\node_modules\rhea-promise\dist\lib\awaitableSender.js:133:69)
at listOnTimeout (internal/timers.js:557:17)
at processTimers (internal/timers.js:500:7)
Expected behavior This case should not crash the application.
Package-version: 3.0.1 node.js version: 14.21.3 OS name and version: any