bugfix: stream-typed cosocket might read uninitialized memory bytes when logging errors due to sending to or receiving from a closed socket.