mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-08-09 15:54:56 +02:00
Don't use set() since it's not in python 2.3.
Just use a plain list instead. Technically probably slightly worse asymptotic behaviour, but it's not like we'll have a million sockets anyway.
This commit is contained in:
10
server.py
10
server.py
@ -158,9 +158,9 @@ def main():
|
||||
if rpid:
|
||||
raise Fatal('hostwatch exited unexpectedly: code 0x%04x\n' % rv)
|
||||
|
||||
r = set()
|
||||
w = set()
|
||||
x = set()
|
||||
r = []
|
||||
w = []
|
||||
x = []
|
||||
handlers = filter(lambda s: s.ok, handlers)
|
||||
for s in handlers:
|
||||
s.pre_select(r,w,x)
|
||||
@ -169,10 +169,10 @@ def main():
|
||||
mux.fullness, mux.too_full))
|
||||
(r,w,x) = select.select(r,w,x)
|
||||
#log('r=%r w=%r x=%r\n' % (r,w,x))
|
||||
ready = set(r) | set(w) | set(x)
|
||||
ready = r+w+x
|
||||
for s in handlers:
|
||||
#debug2('check: %r: %r\n' % (s, s.socks & ready))
|
||||
if s.socks & ready:
|
||||
if list_contains_any(s.socks, ready):
|
||||
s.callback()
|
||||
mux.check_fullness()
|
||||
mux.callback()
|
||||
|
Reference in New Issue
Block a user