3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

selectdriver: don't crash if _run_irc hits an error

This commit is contained in:
James Lu 2018-03-21 20:14:27 -07:00
parent 5172841378
commit 989259af97

View File

@ -19,8 +19,12 @@ def _process_conns():
while not world.shutting_down.is_set():
for socketkey, mask in selector.select(timeout=SELECT_TIMEOUT):
irc = socketkey.data
if mask & selectors.EVENT_READ and not irc._aborted.is_set():
irc._run_irc()
try:
if mask & selectors.EVENT_READ and not irc._aborted.is_set():
irc._run_irc()
except:
log.exception('Error in select driver loop:')
continue
def register(irc):
"""