Handle any exception that could come from sending a packet to a client

This commit is contained in:
Matthew Jones 2015-04-22 16:50:20 -04:00
parent 0535d1c8c9
commit 5a401c31aa

View File

@ -132,7 +132,11 @@ def notification_handler(server):
}
for session_id, socket in list(server.sockets.iteritems()):
if session_id in valid_sockets:
socket.send_packet(packet)
try:
socket.send_packet(packet)
except Exception, e:
logger.error("Error sending client packet to %s: %s" % (str(session_id), str(packet)))
logger.error("Error was: " + str(e))
class Command(NoArgsCommand):
'''