Skip to content

Commit bd60b96

Browse files
committed
Updating docs.
1 parent c4ba4af commit bd60b96

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,10 @@ app.get('/events', function (req, res) {
205205

206206
// send a ping approx every 2 seconds
207207
var timer = setInterval(function () {
208-
res.write('data: ping\n\n')
209-
210-
// !!! this is the important part
211-
res.flush()
208+
res.write('data: ping\n\n', function(){
209+
// !!! this is the important part
210+
res.flush()
211+
})
212212
}, 2000)
213213

214214
res.on('close', function () {

0 commit comments

Comments
 (0)