Notify read() when socket is closed.
Merge pull request #724 from mcav/socket-close

Notify read() when socket is closed.