This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author josiahcarlson
Recipients MrJean1, alanmcintyre, donmez, facundobatista, giampaolo.rodola, josiahcarlson, mark.dickinson, r.david.murray
Date 2009-05-08.19:38:44
SpamBayes Score 1.8814413e-08
Marked as misclassified No
Message-id <>
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.

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 

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.
Date User Action Args
2009-05-08 19:38:46josiahcarlsonsetrecipients: + josiahcarlson, facundobatista, mark.dickinson, alanmcintyre, giampaolo.rodola, donmez, MrJean1, r.david.murray
2009-05-08 19:38:46josiahcarlsonsetmessageid: <>
2009-05-08 19:38:45josiahcarlsonlinkissue5798 messages
2009-05-08 19:38:45josiahcarlsoncreate