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 schmir
Recipients alanmcintyre, gvanrossum, schmir
Date 2008-03-26.22:54:22
SpamBayes Score 0.554711
Marked as misclassified No
Message-id <1206572064.19.0.943747618269.issue1503@psf.upfronthosting.co.za>
In-reply-to
Content
With the following diff, test_xmlrpc.py passes without problems.

Like I said, someone else should decide where to turn on blocking mode.
I now think that it should be in the socket.accept (i.e. in the C code)
at least for unix platforms.
Those who really want a nonblocking socket, will most probably call that
setblocking(0) anyway (or their program is broken on linux, which
returns blocking sockets by default).



--- a/Lib/SocketServer.py	Wed Mar 26 22:41:36 2008 +0100
+++ b/Lib/SocketServer.py	Wed Mar 26 23:48:13 2008 +0100
@@ -441,8 +441,10 @@
         May be overridden.
 
         """
-        return self.socket.accept()
-
+        r= self.socket.accept()
+        r[0].setblocking(1)
+        return r
+    
     def close_request(self, request):
         """Called to clean up an individual request."""
         request.close()
History
Date User Action Args
2008-03-26 22:54:24schmirsetspambayes_score: 0.554711 -> 0.554711
recipients: + schmir, gvanrossum, alanmcintyre
2008-03-26 22:54:24schmirsetspambayes_score: 0.554711 -> 0.554711
messageid: <1206572064.19.0.943747618269.issue1503@psf.upfronthosting.co.za>
2008-03-26 22:54:23schmirlinkissue1503 messages
2008-03-26 22:54:22schmircreate