Https request when ws is working
I think I'm missing something and will be thankful for pointing me to the right direction. There is a websocket connection to some host and when I'm trying to do some request to the same host using require(https).request nothing happens. No data, error or end events fired for such request. Only this appears after long time waiting:
{ Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1130:19)
at Object.onceWrapper (events.js:314:30)
at emitNone (events.js:110:20)
at TLSSocket.emit (events.js:207:7)
at endReadableNT (_stream_readable.js:1047:12)
at _combinedTickCallback (internal/process/next_tick.js:102:11)
at process._tickCallback (internal/process/next_tick.js:161:9) code: 'ECONNRESET' }
Error: socket hang up
If I turn ws off, the same request works without any issues.
Update. Noticed that I can't send requests to any host. Looks like requests are hanging in a pool, but setting agent to false doesn't help.
I faced off the same error like above. How to you resolve this, @Lisio ?
Yes, I was doing some sorting on every event and each sort required more time to complete than it had between those events.