[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [flashproxy/master] Use blocking sockets in flashproxy-client.
commit 4d798ff332b47b154eb01a90b80ab67ebc2c5a61
Author: Alexandre Allaire <alexandre.allaire@xxxxxxxxxxxxxx>
Date: Thu Nov 1 11:07:33 2012 -0400
Use blocking sockets in flashproxy-client.
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
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits