tracker: patch for potential empty call_end msg #3249

This commit is contained in:
nick-delirium 2025-04-01 11:05:42 +02:00
parent f3b98dad8a
commit b2fcd7094b
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0

View file

@ -488,11 +488,12 @@ export default class Assist {
if (recordingState.isActive) recordingState.stopRecording();
});
socket.on("call_end", (socketId, { data: callId }) => {
if (!callingAgents.has(socketId)) {
socket.on("call_end", (socketId, msg) => {
if (!callingAgents.has(socketId) || !msg) {
app.debug.warn("Received call_end from unknown agent", socketId);
return;
}
const { data: callId } = msg;
endAgentCall({ socketId, callId });
});