Fix handling of empty payloads in websocket client (#7838)

This commit is contained in:
frytimo
2026-04-10 11:25:11 -03:00
committed by GitHub
parent f84b752058
commit bc1cfd66ea
@@ -57,6 +57,11 @@ class ws_client {
return; return;
} }
// No pending request and empty payload is dropped
if (switch_event == null) {
return;
}
// Otherwise it's a serverpushed event… // Otherwise it's a serverpushed event…
// e.g. env.service === 'event' or env.topic is your event name // e.g. env.service === 'event' or env.topic is your event name
this._dispatchEvent(message.service_name, switch_event); this._dispatchEvent(message.service_name, switch_event);