"socket hang up" when using Proxy
See original GitHub issueI am using a http proxy with speedtest-net like below:
var speedTest = require('speedtest-net');
speedTest.visual({maxTime: 15000, proxy: "http://127.0.0.1:7890"}, (err, data) => {
console.dir(err, data);
});
Then got an error:
{ Error: socket hang up
at createHangUpError (_http_client.js:322:15)
at Socket.socketOnEnd (_http_client.js:425:23)
at Socket.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1094:12)
at process._tickCallback (internal/process/next_tick.js:63:19) code: 'ECONNRESET' }
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Socket hangup while posting request to Node-http-proxy ...
I think the issue comes from the order of middleware. Using bodyParser before httpProxy will break the requests with JSON body ...
Read more >NodeJS - What does socket hang up actually mean
When a socket hang up is thrown, one of two things happens: When you're a customer, When you send a request to a...
Read more >Issue #527 · http-party/node-http-proxy - socket hang up
It happens predictably every time a connection is intentionally aborted by the client (can be quite often); There is no way to 'properly...
Read more >502 Bad Gateway - Socket hang up | Apigee Edge
The error code [socket hang up][ECONNRESET] indicates that the target server has closed the connection with Edge Microgateway.
Read more >Gulp - Fix to socket hang up using httpProxy - Michael Cranston
Adding simple error handling to your httpProxy will disallow the hangup and keep your sanity in check: var proxy = httpProxy.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Probably be fixed in #82. If this is not the case, let me know and I will reopen.
works fine, thx