mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
fix uncaught exception in certain ws reconnect scenarios
This commit is contained in:
@@ -144,7 +144,7 @@ class WsRequestor extends BaseRequestor {
|
||||
return new Promise((resolve, reject) => {
|
||||
/* give the far end a reasonable amount of time to ack our message */
|
||||
const timer = setTimeout(() => {
|
||||
const {failure} = this.messagesInFlight.get(msgid);
|
||||
const {failure} = this.messagesInFlight.get(msgid) || {};
|
||||
failure && failure(`timeout from far end for msgid ${msgid}`);
|
||||
this.messagesInFlight.delete(msgid);
|
||||
}, RESPONSE_TIMEOUT_MS);
|
||||
|
||||
Reference in New Issue
Block a user