irc: do not busy wait when EOS from IRC

This commit is contained in:
moneromooo 2016-06-08 21:22:14 +01:00
parent 2d324d6415
commit 95cda86928

View file

@ -443,6 +443,8 @@ class IRCNetwork(Network):
(r,w,x)=select.select([self.irc.fileno()],[],[],1)
if self.irc.fileno() in r:
newdata=self._irc_recv(4096,socket.MSG_DONTWAIT)
if len(newdata) == 0:
raise RuntimeError('0 bytes received, EOF')
else:
newdata = None
if self.irc.fileno() in x: