Skip to content

Commit 61ed4b2

Browse files
authored
Merge pull request #1100 from websockets/remove/unneeded-events
Remove unnecessary events
2 parents abd27fe + f83843d commit 61ed4b2

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

lib/WebSocketServer.js

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ class WebSocketServer extends EventEmitter {
8585
this._ultron.on('error', (err) => this.emit('error', err));
8686
this._ultron.on('upgrade', (req, socket, head) => {
8787
this.handleUpgrade(req, socket, head, (client) => {
88-
this.emit(`connection${req.url}`, client);
8988
this.emit('connection', client);
9089
});
9190
});

test/WebSocketServer.test.js

-14
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,6 @@ describe('WebSocketServer', function () {
105105
});
106106
});
107107

108-
it('emits path specific connection event', function (done) {
109-
const server = http.createServer();
110-
111-
server.listen(++port, () => {
112-
const wss = new WebSocketServer({ server });
113-
const ws = new WebSocket(`ws://localhost:${port}/endpointName`);
114-
115-
wss.on('connection/endpointName', (ws) => {
116-
wss.close();
117-
server.close(done);
118-
});
119-
});
120-
});
121-
122108
it('will not crash when it receives an unhandled opcode', function (done) {
123109
const wss = new WebSocketServer({ port: ++port });
124110

0 commit comments

Comments
 (0)