Backed out changeset 481a3c76e313 (bug 1240610) for b2g xpcshell failures CLOSED TREE

This commit is contained in:
Wes Kocher 2016-01-19 18:26:45 -08:00
parent c584212d99
commit 211db0c698

View File

@ -116,10 +116,6 @@ class TcpTransport(object):
connection_lost_msg = "Connection to Marionette server is lost. Check gecko.log (desktop firefox) or logcat (b2g) for errors."
def __init__(self, addr, port, socket_timeout=360.0):
"""If `socket_timeout` is `0` or `0.0`, non-blocking socket mode
will be used. Setting it to `1` or `None` disables timeouts on
socket operations altogether.
"""
self.addr = addr
self.port = port
self.socket_timeout = socket_timeout
@ -168,7 +164,7 @@ class TcpTransport(object):
data = ""
bytes_to_recv = 10
while self.socket_timeout is None or (time.time() - now < self.socket_timeout):
while time.time() - now < self.socket_timeout:
try:
chunk = self.sock.recv(bytes_to_recv)
data += chunk