Fix issue with a single query, the connection should be destroyed to stop waiting