Skip to content

Commit 0436af0

Browse files
committed
Added timeout parameter to AdbClient constructor
1 parent 068a219 commit 0436af0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/com/dtmilano/android/viewclient.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2577,7 +2577,9 @@ def connectToDeviceOrExit(timeout=60, verbose=False, ignoresecuredevice=False, i
25772577
print >> sys.stderr, 'Connecting to a device with serialno=%s with a timeout of %d secs...' % \
25782578
(serialno, timeout)
25792579
ViewClient.setAlarm(timeout+5)
2580-
device = adbclient.AdbClient(serialno, ignoreversioncheck=ignoreversioncheck)
2580+
# NOTE: timeout is used for 2 different timeouts, the one to set the alarm to timeout the connection with
2581+
# adb and the timeout used by adb (once connected) for the sockets
2582+
device = adbclient.AdbClient(serialno, ignoreversioncheck=ignoreversioncheck, timeout=timeout)
25812583
ViewClient.setAlarm(0)
25822584
if verbose:
25832585
print >> sys.stderr, 'Connected to device with serialno=%s' % serialno

0 commit comments

Comments
 (0)