Skip to content

Commit

Permalink
#11 fix example server, refresh locks
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan-Feofanov committed Jan 13, 2021
1 parent 655895f commit e04d088
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 5 deletions.
4 changes: 2 additions & 2 deletions example/server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ var httpsServer = https.createServer({

var wss = new WebSocketServer({ server: httpsServer });

wss.on('connection', function (ws) {
var connectionId = ws.upgradeReq.headers['sec-websocket-key'];
wss.on('connection', function (ws, req) {
var connectionId = req.headers['sec-websocket-key'];
var isMaster = false;

if (!masterId) {
Expand Down
37 changes: 36 additions & 1 deletion example/server/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 22 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e04d088

Please sign in to comment.