Backed out changeset cb31d5a52868 (bug 1028407) under suspicion of web-platform bustage on a CLOSED TREE
authorWes Kocher <wkocher@mozilla.com>
Fri, 17 Oct 2014 13:24:51 -0700
changeset 211081 5aea4fbbb47d318e23daf4a2e37bd0468a13c3dc
parent 211080 869a28961b5c2572a18f730fdf4d659cf45d9bf6
child 211082 1c3957daffe6b398ae350b69163c4b14199ad688
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
bugs1028407
milestone36.0a1
backs outcb31d5a52868cc5db479676a216ae056032dedb1
Backed out changeset cb31d5a52868 (bug 1028407) under suspicion of web-platform bustage on a CLOSED TREE
testing/marionette/client/marionette/marionette.py
--- a/testing/marionette/client/marionette/marionette.py
+++ b/testing/marionette/client/marionette/marionette.py
@@ -582,30 +582,27 @@ class Marionette(object):
         except socket.error:
             return False
         finally:
             s.close()
 
     def wait_for_port(self, timeout=60):
         starttime = datetime.datetime.now()
         while datetime.datetime.now() - starttime < datetime.timedelta(seconds=timeout):
-            sock = None
             try:
                 sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
                 sock.connect((self.host, self.port))
                 data = sock.recv(16)
                 sock.close()
                 if ':' in data:
+                    time.sleep(5)
                     return True
             except socket.error:
                 pass
-            finally:
-                if sock:
-                    sock.close()
-            time.sleep(.1)
+            time.sleep(1)
         return False
 
     @do_crash_check
     def _send_message(self, command, response_key="ok", **kwargs):
         if not self.session and command != "newSession":
             raise errors.MarionetteException("Please start a session")
 
         message = {"name": command}