ws icon indicating copy to clipboard operation
ws copied to clipboard

Https request when ws is working

Open Lisio opened this issue 8 years ago • 2 comments

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.

Lisio avatar Dec 30 '17 03:12 Lisio

I faced off the same error like above. How to you resolve this, @Lisio ?

dungvu-equix avatar Jan 04 '18 03:01 dungvu-equix

Yes, I was doing some sorting on every event and each sort required more time to complete than it had between those events.

Lisio avatar Jan 04 '18 07:01 Lisio