Socket: Only catch select.error if it is an interupted system call.

This commit is contained in:
Valentin Lorentz 2013-06-29 13:44:42 +02:00
parent 75654a4544
commit dce3c97fe4

View File

@ -36,6 +36,7 @@ from __future__ import division
import sys import sys
import time import time
import errno
import select import select
import socket import socket
import supybot.log as log import supybot.log as log
@ -164,8 +165,10 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
for instance in cls._instances: for instance in cls._instances:
if instance.conn in rlist: if instance.conn in rlist:
instance._read() instance._read()
except select.error: # 'Interrupted system call' except select.error as e:
pass if e.args[0] != errno.EINTR:
# 'Interrupted system call'
raise
finally: finally:
cls._selecting[0] = False cls._selecting[0] = False
for instance in cls._instances: for instance in cls._instances: