Skip to content

Commit

Permalink
add missing target for simulated error event
Browse files Browse the repository at this point in the history
  • Loading branch information
Atrue committed Feb 9, 2023
1 parent 047858c commit 1ff5f11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class Server extends EventTarget {
if (event === 'error') {
listeners.forEach(socket => {
socket.readyState = WebSocket.CLOSED;
socket.dispatchEvent(createEvent({ type: 'error' }));
socket.dispatchEvent(createEvent({ type: 'error', target: socket.target }));
});
}
}
Expand Down

0 comments on commit 1ff5f11

Please sign in to comment.