Josiah Carlson <josiahcarl...@users.sourceforge.net> added the comment:
Ok, so I was running "test_asyncore" and not "test_asynchat". The issue on OS X is that when a new socket is connecting, select.poll() shows the socket as being writable when it first connects, but using my variant, .connected is False while it's waiting for the connection. Options: If we swap the pollin/pollout conditions, that would fix the hang on mac, but cause the hang on others (I'm not really worried about not doing a write after a read, .push() in asynchat performs an immediate send). If we get rid of the .connected check, then when a .read() fails and causes a close, then we get an exception in handle_write(). If we swap to Giampaolo's variant, then we could lose data that was legitimately sent by a client. I've got a version that doesn't hang on OS X, and should work on all platforms. It's ugly, but it works. ---------- Added file: http://bugs.python.org/file13934/asyncore_fix_mac_2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5798> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com