Moved socket.close() in _Channel._socket_close to ensure that it's still called in the event that socket.shutdown raises an exception.