Fix operator panel disconnect (#7913)

Unfiltered agent lists cause a delay resulting in disconnection from switch
This commit is contained in:
frytimo
2026-04-23 14:50:32 +00:00
committed by GitHub
parent 8923386f9b
commit c793833fd0
2 changed files with 254 additions and 9 deletions
@@ -355,15 +355,21 @@ abstract class base_websocket_system_service extends service implements websocke
// Get the web socket message as an object
$message = websocket_message::create_from_json_message($json_string);
if (!($message instanceof websocket_message)) {
$this->warning('Invalid websocket message received; ignoring frame');
return;
}
$topic = $message->topic();
// Nothing to do
if (empty($message->topic())) {
$this->error("Message received does not have topic");
if (empty($topic)) {
$this->warning("Message received does not have topic. Message dropped.");
return;
}
// Call the registered topic event
$this->trigger_topic($message->topic, $message, $this->ws_client);
$this->trigger_topic($topic, $message, $this->ws_client);
}
/**