hacky solution to make reconnection work after we shut down the event loop