Skip to content

Commit

Permalink
handle error
Browse files Browse the repository at this point in the history
  • Loading branch information
rsp committed Jul 25, 2016
1 parent 6a86e29 commit 221e7cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ws.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ app.get('/', (req, res) => {
app.ws('/', (s, req) => {
console.error('websocket connection');
for (var t = 0; t < 3; t++)
setTimeout(() => s.send('message from server'), 1000*t);
setTimeout(() => s.send('message from server', ()=>{}), 1000*t);
});
app.listen(3001, () => console.error('listening on http://localhost:3001/'));
console.error('websocket example');
Expand Down

0 comments on commit 221e7cd

Please sign in to comment.