Browse Source

handle signal soon; #179

auth
clowwindy 10 years ago
parent
commit
380a646f09
  1. 5
      shadowsocks/eventloop.py

5
shadowsocks/eventloop.py

@ -206,9 +206,10 @@ class EventLoop(object):
events = self.poll(1) events = self.poll(1)
except (OSError, IOError) as e: except (OSError, IOError) as e:
if errno_from_exception(e) in (errno.EPIPE, errno.EINTR): if errno_from_exception(e) in (errno.EPIPE, errno.EINTR):
# Happens when the client closes the connection # EPIPE: Happens when the client closes the connection
# EINTR: Happens when received a signal
# handles them as soon as possible
logging.debug('poll:%s', e) logging.debug('poll:%s', e)
continue
else: else:
logging.error('poll:%s', e) logging.error('poll:%s', e)
import traceback import traceback

Loading…
Cancel
Save