You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!header) {
header = socket.read(24);
if (!header) {
return;
}
}
if (!bodyLength) {
bodyLength = header.readInt32BE(16) + header.readInt32BE(20);
}
header = socket.read(24)在connection断开后,header是有值的, 根据buffer内的实际长度返回,随后是header.readInt32BE(16) 就可能出现exception, 如RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 11. Received 16
是不是考虑也判断下header的长度 === 24, 至少这样不至于程序崩溃
The text was updated successfully, but these errors were encountered:
在clusterClient模式下, 手贱去telnet了下端口,结果程序crash了.
看了下, lib/server.js
header = socket.read(24)在connection断开后,header是有值的, 根据buffer内的实际长度返回,随后是header.readInt32BE(16) 就可能出现exception, 如RangeError [ERR_OUT_OF_RANGE]: The value of "offset" is out of range. It must be >= 0 and <= 11. Received 16
是不是考虑也判断下header的长度 === 24, 至少这样不至于程序崩溃
The text was updated successfully, but these errors were encountered: