diff --git a/server-sent-events/drain.js b/server-sent-events/drain.js index c501902..9031e50 100644 --- a/server-sent-events/drain.js +++ b/server-sent-events/drain.js @@ -25,11 +25,10 @@ setInterval(() => { .on('error', () => {}) .end() } -}, 1) +}, 0) setInterval(() => { - http - .post('http://127.0.0.1:8080/', () => print_status(true)) + http.request({ ...query, path: '/' }, () => print_status(true)) .setTimeout(100, () => print_status(false)) .on('error', () => {}) }, 20)