Entropy/Socket Interface:
- implement temporary loop check git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@2103 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
+16
-1
@@ -12436,8 +12436,23 @@ class SocketHostInterface:
|
||||
|
||||
if self.valid_connection:
|
||||
|
||||
loop_counter = 0
|
||||
|
||||
while 1:
|
||||
|
||||
# XXX: remove this, testing !
|
||||
loop_counter += 1
|
||||
if loop_conter > 100000000:
|
||||
self.server.processor.HostInterface.updateProgress(
|
||||
'interrupted: %s, reason: %s - from client: %s' % (
|
||||
self.server.server_address,
|
||||
"max while loop count reached",
|
||||
self.client_address,
|
||||
)
|
||||
)
|
||||
self.entropyTools.printTraceback()
|
||||
break
|
||||
|
||||
if self.timed_out:
|
||||
break
|
||||
self.timed_out = True
|
||||
@@ -12474,7 +12489,7 @@ class SocketHostInterface:
|
||||
xlen = len(x)
|
||||
self.data_counter -= xlen
|
||||
self.buffered_data += x
|
||||
if xlen == 0:
|
||||
if not xlen:
|
||||
break
|
||||
self.data_counter = None
|
||||
except ValueError:
|
||||
|
||||
Reference in New Issue
Block a user