socket hang up
我的服务端是基于express 框架架构的,其中有一个请求的处理时间特别长,但客户端需要等待处理结果,客户端用的是 request 模块去请求的,结果报错如下
{ Error: socket hang up at createHangUpError (_http_client.js:331:15) at Socket.socketOnEnd (_http_client.js:423:23) at emitNone (events.js:111:20) at Socket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1064:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9) code: ‘ECONNR ESET’ }
请指导指导,
2 回复
用needle 或者你的头信息不合适
process.env.NODE_TLS_REJECT_UNAUTHORIZED = “0” 试试