(stream, cb)
| 25505 | }; |
| 25506 | |
| 25507 | function writeAfterEnd(stream, cb) { |
| 25508 | var er = new Error('write after end'); |
| 25509 | // TODO: defer error events consistently everywhere, not just the cb |
| 25510 | stream.emit('error', er); |
| 25511 | processNextTick(cb, er); |
| 25512 | } |
| 25513 | |
| 25514 | // Checks that a user-supplied chunk is valid, especially for the particular |
| 25515 | // mode the stream is in. Currently this means that `null` is never accepted |