Commit 09f60bc5 authored by Jason Madden's avatar Jason Madden

More temporary debugging for test__socket.

parent 75e86ddb
...@@ -291,6 +291,7 @@ class socket(object): ...@@ -291,6 +291,7 @@ class socket(object):
data_sent = 0 data_sent = 0
while data_sent < len(data): while data_sent < len(data):
data_sent += self.send(_get_memory(data, data_sent), flags) data_sent += self.send(_get_memory(data, data_sent), flags)
return data_sent, 'no timeout'
else: else:
timeleft = self.timeout timeleft = self.timeout
end = time.time() + timeleft end = time.time() + timeleft
...@@ -298,7 +299,7 @@ class socket(object): ...@@ -298,7 +299,7 @@ class socket(object):
while True: while True:
data_sent += self.send(_get_memory(data, data_sent), flags, timeout=timeleft) data_sent += self.send(_get_memory(data, data_sent), flags, timeout=timeleft)
if data_sent >= len(data): if data_sent >= len(data):
break return data_sent, 'timeout', self.timeout
timeleft = end - time.time() timeleft = end - time.time()
if timeleft <= 0: if timeleft <= 0:
raise timeout('timed out') raise timeout('timed out')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment