Close connection on thrown excpetion.