Skip to content

Commit

Permalink
[doc] Add request to emit arguments in shared server example (#1372)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeavsec authored and lpinca committed Apr 30, 2018
1 parent 690b3f2 commit 4385c78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -233,11 +233,11 @@ server.on('upgrade', function upgrade(request, socket, head) {

if (pathname === '/foo') {
wss1.handleUpgrade(request, socket, head, function done(ws) {
wss1.emit('connection', ws);
wss1.emit('connection', ws, request);
});
} else if (pathname === '/bar') {
wss2.handleUpgrade(request, socket, head, function done(ws) {
wss2.emit('connection', ws);
wss2.emit('connection', ws, request);
});
} else {
socket.destroy();
Expand Down

0 comments on commit 4385c78

Please sign in to comment.