QPID-4714 Moved _delegate.closeConnection method inside a finally block to ensure the TCP connection is closed in case an exception is thrown from any of the methods above.