Previously we were potentially running cleanup on a different
event loop, even if the session's associated event loop was
active. This manifested in RuntimeError instances being raised
when synchronous cleanup was attempted. Change cleanup to
always use the session's associated event loop and add some
logging when things have gone wrong.
Previously we were potentially running cleanup on a different event loop, even if the session's associated event loop was active. This manifested in RuntimeError instances being raised when synchronous cleanup was attempted. Change cleanup to always use the session's associated event loop and add some logging when things have gone wrong.