Avoid closing socket output stream