fix exception that appears in logs if session ends before last call status update

This commit is contained in:
Dave Horton committed 2023-07-18 13:20:53 -04:00
1 parent d8543f73f2
commit 6793bbf330
3 files changed
+7 -4

No files matched your search

+1 -1
View File
@@ -138,7 +138,7 @@ class WsRequestor extends BaseRequestor {
/* simple notifications */
if (['call:status', 'verb:status', 'jambonz:error'].includes(type) || reconnectingWithoutAck) {
this.ws.send(JSON.stringify(obj), () => {
this.ws?.send(JSON.stringify(obj), () => {
this.logger.debug({obj}, `WsRequestor:request websocket: sent (${url})`);
sendQueuedMsgs();
});