R. David Murray added the comment: The 'Server did not stop' error was lying in wait for the NoneType bug to be fixed :) So, if you didn't the NoneType, my test case isn't reproducing the problem for you, which is odd. Using call_soon_threadsafe from an addCleanup in the _server method makes it work for me. (Seems to work even without the threadsafe, but I think I'll keep it!) Perhaps seeing the NoneType error is a timing issue, given that the problem is thread safety.
So, my apologies for the noise. I guess I'm too used to threads, where it is typical to call the close or stop method from another thread. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22572> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com