contrib/bsc_control.py: Patch by Holger to handle connection resets

This commit is contained in:
Daniel Willmann 2011-07-28 19:04:57 +02:00 committed by Holger Hans Peter Freyther
parent 80c37bd806
commit 7c3298af9e
1 changed files with 4 additions and 0 deletions

View File

@ -93,6 +93,10 @@ while (len(data)>0):
if options.monitor:
while (True):
data = sock.recv(1024)
if len(data) == 0:
print "Connection is gone."
break
while (len(data)>0):
(answer, data) = remove_ipa_ctrl_header(data)
print "Got message:", answer