首页 > 编程知识 正文

net::ERR_SPDY_PROTOCOL_ERROR,nodejs mysql框架

时间:2023-05-06 12:26:11 阅读:18039 作者:1748

错误消息:

error :读取枚举集

at TCP.onstreamread (internal/stream _ base _ commons.js 3360162:27 )。

这种情况通常是客户端关闭套接字连接导致的错误,该错误会导致程序异常终止

解决方案:

varpreq=http.request(options,function ) (pres )

CSO CK.write head (pres.status code,pRes.headers );

PRES.pipe(CSOCK;

}.on (连接),) res,socket,head )={

常数{ http version,statusCode,statusMessage }=res;

CSO CK.write (http/$ { http版本} $ { status code } $ { status message }rnr (n ) };

CSO CK.pipe (套接字);

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} ` );

);

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。