Browse code

Merge pull request #13147 from leedm777/connect-timeout

Increase the escalation prompt timeout

Brian Coca authored on 2015/11/14 03:45:01
Showing 1 changed files
... ...
@@ -392,7 +392,10 @@ class Connection(ConnectionBase):
392 392
             become_error=False, become_nopasswd_error=False
393 393
         )
394 394
 
395
-        timeout = self._play_context.timeout
395
+        # select timeout should be longer than the connect timeout, otherwise
396
+        # they will race each other when we can't connect, and the connect
397
+        # timeout usually fails
398
+        timeout = 2 + self._play_context.timeout
396 399
         rpipes = [p.stdout, p.stderr]
397 400
         for fd in rpipes:
398 401
             fcntl.fcntl(fd, fcntl.F_SETFL, fcntl.fcntl(fd, fcntl.F_GETFL) | os.O_NONBLOCK)