There is a race condition between qpid::client::SessionImpl::waitForCompletion and qpid::client::SessionImpl::~SessionImpl. If one thread is waiting for a
completion and another thread causes the destructor for the session to be invoked, the destructor can abort the client if waitForCompletion is still holding the state mutex. The reason this occurs is because waitForCompletion is not holding a Waiter::ScopedWait, so the destructor completes while the
mutex is still being held. This was discovered when testing connection loss and recovery.