Closing one end of a stream_socket_pair causes other end to report EOF.

Fixes Issue #1730.