Commit c98c1d79 authored by Jim Fulton's avatar Jim Fulton

Fix #22

parent 0bde3265
...@@ -51,7 +51,7 @@ def client_loop(map): ...@@ -51,7 +51,7 @@ def client_loop(map):
try: try:
r, w, e = select.select(r, w, e, client_timeout()) r, w, e = select.select(r, w, e, client_timeout())
except select.error as err: except (select.error, RuntimeError) as err:
# Python >= 3.3 makes select.error an alias of OSError, # Python >= 3.3 makes select.error an alias of OSError,
# which is not subscriptable but does have the 'errno' attribute # which is not subscriptable but does have the 'errno' attribute
err_errno = getattr(err, 'errno', None) or err[0] err_errno = getattr(err, 'errno', None) or err[0]
...@@ -69,6 +69,13 @@ def client_loop(map): ...@@ -69,6 +69,13 @@ def client_loop(map):
if [fd for fd in w if fd not in map]: if [fd for fd in w if fd not in map]:
continue continue
# Hm, on Mac OS X, we could get a run time
# error and end up here, but retrying select
# would work. Let's try:
select.select(r, w, e, 0)
# we survived, keep going :)
continue
raise raise
else: else:
continue continue
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment