diff --git a/src/server.js b/src/server.js index 0ed7a702..e28a037e 100644 --- a/src/server.js +++ b/src/server.js @@ -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 })); }); } }