当前位置:网站首页>mysql econnreset_Nodejs 套接字报错处理 Error: read ECONNRESET
mysql econnreset_Nodejs 套接字报错处理 Error: read ECONNRESET
2022-07-05 12:51:00 【全栈程序员站长】
大家好,又见面了,我是你们的朋友全栈君。
错误信息:
Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:162:27)
出现上述情况一般是客户端关闭了socket连接导致的错误,这个错误会导致程序的异常退出
解决办法:
var pReq = http.request(options, function (pRes) {
cSock.writeHead(pRes.statusCode, pRes.headers);
pRes.pipe(cSock);
}).on(‘connect’, (res, socket, head) => {
const { httpVersion, statusCode, statusMessage } = res;
cSock.write(`HTTP/{httpVersion} {statusCode}
cSock.pipe(socket);
socket.pipe(cSock);
socket.on(‘error’,(e)=>{
console.log(‘====>’,e.stack)
socket.destroy()
})
cSock.on(‘error’,(e)=>{
console.log(‘====>’,e.stack)
})
cSock.on(‘close’,()=>{
console.log(‘close===========’)
cSock.destroy()
})
}).on(‘error’, function (e) {
console.error(`请求遇到问题: ${e.message}`);
});
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/149592.html原文链接:https://javaforall.cn
边栏推荐
- stirring! 2022 open atom global open source summit registration is hot!
- Alipay transfer system background or API interface to avoid pitfalls
- Association modeling method in SAP segw transaction code
- Navigation property and entityset usage in SAP segw transaction code
- 初次使用腾讯云,解决只能使用webshell连接,不能使用ssh连接。
- 事务的基本特性和隔离级别
- ##无监控,不运维,以下是监控里常用的脚本监控
- What is the difference between Bi software in the domestic market
- 实现 1~number 之间,所有数字的加和
- 逆波兰表达式
猜你喜欢
946. 验证栈序列
A specific example of ABAP type and EDM type mapping in SAP segw transaction code
Didi open source Delta: AI developers can easily train natural language models
Introduction aux contrôles de la page dynamique SAP ui5
Taobao order interface | order flag remarks, may be the most stable and easy-to-use interface
How to protect user privacy without password authentication?
Transactions from December 29, 2021 to January 4, 2022
关于 SAP UI5 getSAPLogonLanguage is not a function 的错误消息以及 API 版本的讨论
Simple page request and parsing cases
ABAP editor in SAP segw transaction code
随机推荐
Introduction to sap ui5 dynamicpage control
[Nacos cloud native] the first step of reading the source code is to start Nacos locally
聊聊异步编程的 7 种实现方式
Transactions from January 14 to 19, 2022
跨平台(32bit和64bit)的 printf 格式符 %lld 输出64位的解决方式
LB10S-ASEMI整流桥LB10S
自然语言处理系列(一)入门概述
CF:A. The Third Three Number Problem【关于我是位运算垃圾这个事情】
滴滴开源DELTA:AI开发者可轻松训练自然语言模型
155. 最小栈
太方便了,钉钉上就可完成代码发布审批啦!
Super efficient! The secret of swagger Yapi
Solve Unicode decodeerror: 'GBK' codec can't decode byte 0xa2 in position 107
Discussion on error messages and API versions of SAP ui5 getsaplogonlanguage is not a function
Wechat enterprise payment to change access, open quickly
Shi Zhenzhen's 2021 summary and 2022 outlook | colorful eggs at the end of the article
Install rhel8.2 virtual machine
【云原生】Nacos-TaskManager 任务管理的使用
Run, open circuit
SAP SEGW 事物码里的 Association 建模方式