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. (cherry picked from commit 874b973366824fba1ae502b10c9a5b66c11e4779)