mirror of
https://git.wownero.com/wownero/tippero.git
synced 2024-08-15 00:33:14 +00:00
irc: do not busy wait when EOS from IRC
This commit is contained in:
parent
2d324d6415
commit
95cda86928
1 changed files with 2 additions and 0 deletions
|
@ -443,6 +443,8 @@ class IRCNetwork(Network):
|
||||||
(r,w,x)=select.select([self.irc.fileno()],[],[],1)
|
(r,w,x)=select.select([self.irc.fileno()],[],[],1)
|
||||||
if self.irc.fileno() in r:
|
if self.irc.fileno() in r:
|
||||||
newdata=self._irc_recv(4096,socket.MSG_DONTWAIT)
|
newdata=self._irc_recv(4096,socket.MSG_DONTWAIT)
|
||||||
|
if len(newdata) == 0:
|
||||||
|
raise RuntimeError('0 bytes received, EOF')
|
||||||
else:
|
else:
|
||||||
newdata = None
|
newdata = None
|
||||||
if self.irc.fileno() in x:
|
if self.irc.fileno() in x:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue