Aviv Palivoda added the comment: I see your point about the server_close purpose and I changed the patch to simulate the behavior of closed file (raising ValueError when operating on closed file). I don't think that this should be an enhancement as what i try to do is return the behavior as it was before the change to the selectors module. When closing the socket using server_close at the next serve_forever loop you would have gotten ValueError for bad file descriptor to select. In the current implementation we actually keep on pulling on a already free resource. I know that the user should call shutdown before the server_close but i think that as you said the behavior should simulate closed file. When someone will try to use any other function of a closed file he will receive a ValueError.
---------- Added file: http://bugs.python.org/file41978/socketserver_close_stop_serve_forever2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26392> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com