release: WRNexusJS 0.2.75
This commit is contained in:
@@ -31,6 +31,17 @@ export class HmrHub {
|
||||
this.sockets.delete(ws);
|
||||
}
|
||||
|
||||
broadcastJson(message: unknown): void {
|
||||
const payload = JSON.stringify(message);
|
||||
for (const ws of this.sockets) {
|
||||
try {
|
||||
ws.send(payload);
|
||||
} catch {
|
||||
this.sockets.delete(ws);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
broadcast(message: HmrMessage): void {
|
||||
const payload = JSON.stringify(message);
|
||||
for (const ws of this.sockets) {
|
||||
|
||||
Reference in New Issue
Block a user