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:
Родитель
e698dd38c3
Коммит
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);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче