mirror of
https://github.com/Syncplay/syncplay
synced 2025-03-11 06:07:53 +00:00
[irc] handle socket.error
This commit is contained in:
parent
7be8c23cd6
commit
47a8cce82a
@ -181,7 +181,12 @@ class Bot(object):
|
|||||||
|
|
||||||
def handlingThread(sock, bot):
|
def handlingThread(sock, bot):
|
||||||
while bot.active:
|
while bot.active:
|
||||||
rcvd = sock.recv(4096).split('\n')
|
try:
|
||||||
|
rcvd = sock.recv(4096).split('\n')
|
||||||
|
except socket.error, info:
|
||||||
|
bot.active = False
|
||||||
|
print '\033[91mSocket error (bot disconnected)\033[0;0m ' + str(info)
|
||||||
|
break
|
||||||
for line in rcvd:
|
for line in rcvd:
|
||||||
try:
|
try:
|
||||||
line = line.replace('\r', '')
|
line = line.replace('\r', '')
|
||||||
|
Loading…
Reference in New Issue
Block a user