mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
net: check status code in afterWrite
Fixes memory leak and spin on writing to dead fds. This was tested in production.
This commit is contained in:
parent
e698dd38c3
commit
8295c80618
@ -465,7 +465,11 @@ function afterWrite(status, handle, req, buffer) {
|
||||
if (self.destroyed) {
|
||||
return;
|
||||
}
|
||||
// TODO check status.
|
||||
|
||||
if (status) {
|
||||
self.destroy(errnoException(errno, 'write'));
|
||||
return;
|
||||
}
|
||||
|
||||
timers.active(this);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user