Alisue Lambda <lambdali...@hashnote.net> added the comment:
I use the following patch to fix the behavior in Windows. ``` import sys if sys.platform != 'win32': def patch(): pass else: def patch(): """Patch selectors.SelectSelector to fix WinError 10038 in Windows Ref: https://bugs.python.org/issue33350 """ import select from selectors import SelectSelector def _select(self, r, w, _, timeout=None): try: r, w, x = select.select(r, w, w, timeout) except OSError as e: if hasattr(e, 'winerror') and e.winerror == 10038: # descriptors may already be closed return [], [], [] raise else: return r, w + x, [] SelectSelector._select = _select ``` ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33350> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com