diff options
author | ayanamist <contact@ayanamist.com> | 2014-01-03 19:37:16 +0800 |
---|---|---|
committer | Fedor Indutny <fedor.indutny@gmail.com> | 2014-01-05 19:44:45 +0400 |
commit | b922b5e90d2c14dd332b95827c2533e083df7e55 (patch) | |
tree | b3bb6326380159798bf9af5a2f4cc790ad91b8e7 /deps/npm/man/man1/npm-help-search.1 | |
parent | aa56d9d35405a56b8478c0a83106ffa4ada903db (diff) | |
download | node-b922b5e90d2c14dd332b95827c2533e083df7e55.tar.gz |
stream: writes may return false but forget to emit drain
If a write is above the highWaterMark, _write still manages to
fully send it synchronously, _writableState.length will be adjusted down
to 0 synchronously with the write returning false, but 'drain' will
not be emitted until process.nextTick.
If another small write which is below highWaterMark is issued before
process.nextTick happens, _writableState.needDrain will be reset to false,
and the drain event will never be fired.
So we should check needDrain before setting it up, which prevents it
from inproperly resetting to false.
Diffstat (limited to 'deps/npm/man/man1/npm-help-search.1')
0 files changed, 0 insertions, 0 deletions