Message87465
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. |
|
Date |
User |
Action |
Args |
2009-05-08 19:38:46 | josiahcarlson | set | recipients:
+ josiahcarlson, facundobatista, mark.dickinson, alanmcintyre, giampaolo.rodola, donmez, MrJean1, r.david.murray |
2009-05-08 19:38:46 | josiahcarlson | set | messageid: <1241811526.66.0.0894277186359.issue5798@psf.upfronthosting.co.za> |
2009-05-08 19:38:45 | josiahcarlson | link | issue5798 messages |
2009-05-08 19:38:45 | josiahcarlson | create | |
|