From 888123742cd30c25c93aafe7da9e1641cadbc6a1 Mon Sep 17 00:00:00 2001 From: Michael Clayton Date: Wed, 29 Mar 2023 22:57:54 -0400 Subject: [PATCH] fix server-sent-events/drain.js (#615) --- server-sent-events/drain.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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)