dcormier has uploaded a patch.
Description:
This patch fixes a race condition that may cause an unhandled exception when Session.RaiseError is called from within Session.MessageListener(). This exception is on a worker thread, so cannot be caught by the caller of the client. The solution is to not let the main thread throw its exception until the worker thread has finished cleaning up.