mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
Fix OpenSSL 100% CPU usage on error
This commit is contained in:
1 parent
ff953dccf1
commit
cde80d9859
1 file changed
+5
@@ -515,6 +515,11 @@ function initStream (self) {
|
||||
|
||||
// Optimization: emit the original buffer with end points
|
||||
if (self.ondata) self.ondata(pool, start, end);
|
||||
} else if (bytesRead == -2) {
|
||||
// Temporary fix - need SSL refactor.
|
||||
// -2 originates from SecureStream::ReadExtract
|
||||
self.destroy(new Error('openssl read error'));
|
||||
return false;
|
||||
}
|
||||
};
|
||||
self.readable = false;
|
||||
|
||||
Reference in new issue
Block a user