Fixes a bug that Uphold ran into. An uncaught rejection was bubbling up from end().
I was unable to reproduce locally or as a test case. My best guess is that the error is triggered by a concurrent startSendLoop (i.e. the exchange rate probe) that triggers an error event, while simultaneously a ConnectionClose frame is being handled. The error is caught by the .once('error', reject) in the end method, which bubbles it up.
Also includes a fix for an unrelated sendData error.
Fixes a bug that Uphold ran into. An uncaught rejection was bubbling up from
end()
.I was unable to reproduce locally or as a test case. My best guess is that the error is triggered by a concurrent
startSendLoop
(i.e. the exchange rate probe) that triggers an error event, while simultaneously aConnectionClose
frame is being handled. Theerror
is caught by the.once('error', reject)
in theend
method, which bubbles it up.Also includes a fix for an unrelated
sendData
error.