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 giampaolo.rodola
Recipients François-Xavier.Bourlet, giampaolo.rodola, josiahcarlson, neologix, stutzbach, xdegaye
Date 2011-11-03.18:19:12
SpamBayes Score 1.431054e-05
Marked as misclassified No
Message-id <1320344352.9.0.0158976273756.issue12498@psf.upfronthosting.co.za>
In-reply-to
Content
Follow my comments about half_duplex_close.diff (current latest patch).

+    def handle_close(self):
+        if not self._closing:
+            self._closing = True
+            # try to drain the output buffer
+            while self.writable() and self.initiate_send() > 0:
+                pass
+        self.close()

*Any* while loop should be avoided in the dispatcher. 
The risk is you keep the poller busy for more than a single loop or, at worst, forever.

Also, you expect initiate_send() to return a meaningful value which breaks compatibility with existing asynchat code overriding it.
History
Date User Action Args
2011-11-03 18:19:12giampaolo.rodolasetrecipients: + giampaolo.rodola, josiahcarlson, stutzbach, neologix, xdegaye, François-Xavier.Bourlet
2011-11-03 18:19:12giampaolo.rodolasetmessageid: <1320344352.9.0.0158976273756.issue12498@psf.upfronthosting.co.za>
2011-11-03 18:19:12giampaolo.rodolalinkissue12498 messages
2011-11-03 18:19:12giampaolo.rodolacreate