commit 9cc3c1af55c59c73e8809fbaed8242cd65898d24 Author: Alexandre Allaire alexandre.allaire@mail.mcgill.ca Date: Thu Nov 1 11:07:33 2012 -0400
Removed the setblocking call in listen_socket, all sockets are now blocking. This fixes an issue on Windows where non-bocking sockets would throw an exception if they couldn't complete a sendall call immediately. See trac ticket #7272 for more info.
This doesn't affect the execution of the program substantially, since it uses a select call to process the incoming data. --- flashproxy-client | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/flashproxy-client b/flashproxy-client index 1e32d8f..8bc3c3f 100755 --- a/flashproxy-client +++ b/flashproxy-client @@ -451,7 +451,7 @@ class WebSocketBinaryEncoder(object):
def listen_socket(addr): - """Return a nonblocking socket listening on the given address.""" + """Return a socket listening on the given address.""" addrinfo = socket.getaddrinfo(addr[0], addr[1], 0, socket.SOCK_STREAM, socket.IPPROTO_TCP)[0] s = socket.socket(addrinfo[0], addrinfo[1], addrinfo[2]) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) @@ -470,7 +470,6 @@ def listen_socket(addr): pass s.bind(addr) s.listen(10) - s.setblocking(0) return s
# How long to wait for a WebSocket request on the remote socket. It is limited