[MINOR] stream_sock: prepare for closing when all pending data are sent

Since we'll soon be able to close a connection with remaining data in a
buffer, it becomes obvious that we can prepare to close when we're about
to send the last chunk of data and not the whole buffer.
1 file changed