I had a problem with SSE as soon as I deployed my app on Heroku.
In the logs for the SSE there was this error:
Error: 500 RangeError: msecs must be a non-negative finite number
GET /live/redis 500 102.270 ms - -
In my route controller for /live/redis
the first line was:
// let request last as long as possible
req.socket.setTimeout(Infinite);
I just copied it following a guide on the web but it was causing that error. So I changed it with this:
// let request last as long as possible
req.socket.setTimeout(0x7FFFFFFF);
Now it is working as expected but my question is: is it the correct way to solve this issue? There is a better parameter to pass in the setTimeout
to be like Infinite
?
May be you could try Number.MAX_VALUE instead, It works for me.
User contributions licensed under CC BY-SA 3.0