Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
stream: emit EOF instead of ECONNRESET
On various platforms, behaviour in return values differs on the read(2) syscall. On OSX (+ others), read() on a closed-ish socket will return an EOF, while on FreeBSD (+ others), read() on the same closed-ish socket will emit an ECONNRESET error. This commit swallows the ECONNRESET error on the offending platforms to instead emit an EOF, allowing behaviour to be consistent between platforms. Ref: nodejs/node#1885
- Loading branch information