作者热门文章
- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我有 2 个通过 HTTPS 通信的 nodejs 模块。
在极少数情况下,对服务器模块的请求之一返回:
堆栈跟踪
Error: socket hang up
at TLSSocket.onHangUp (_tls_wrap.js:1049:19)
at TLSSocket.g (events.js:260:16)
at emitNone (events.js:72:20)
at TLSSocket.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:913:12)
at nextTickCallbackWith2Args (node.js:442:9)
at process._tickDomainCallback (node.js:397:17)
将错误号设置为 ECONNRESET
为什么会发生这样的事情?
我已经检查过:
此外,服务器日志没有显示任何类型的问题。
谢谢
最佳答案
ECONNRESET (Connection reset by peer): A connection was forcibly closed by a peer. This normally results from a loss of the connection on the remote socket due to a timeout or reboot. Commonly encountered via the http and net modules.
所以先试试看会发生什么
process.on("uncaughtException", function (err) {
console.log('err uncaught Exception : ', err);
})
关于node.js - nodejs TLSSocket.onHangUp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40228074/
我有 2 个通过 HTTPS 通信的 nodejs 模块。 在极少数情况下,对服务器模块的请求之一返回: 堆栈跟踪 Error: socket hang up at TLSSocket.onH
这种情况发生在 v4 - v7 的各种 Node 版本中,也发生在 AxiosJS 和 RequestJS 中。 典型错误消息: { Error: socket hang up at TLSS
我是一名优秀的程序员,十分优秀!