diff --git a/ws.js b/ws.js index 06c3e6d..b3eb3c9 100755 --- a/ws.js +++ b/ws.js @@ -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');