diff --git a/src/com/dtmilano/android/adb/adbclient.py b/src/com/dtmilano/android/adb/adbclient.py index 17de6927..8901c3b6 100644 --- a/src/com/dtmilano/android/adb/adbclient.py +++ b/src/com/dtmilano/android/adb/adbclient.py @@ -204,6 +204,11 @@ def connect(hostname, port, timeout=TIMEOUT): if DEBUG: print >> sys.stderr, "AdbClient.connect(%s, %s, %s)" % (hostname, port, timeout) s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + # SO_LINGER: Idea proposed by kysersozelee (#173) + l_onoff = 1 + l_linger = 0 + s.setsockopt(socket.SOL_SOCKET, socket.SO_LINGER, + struct.pack('ii', l_onoff, l_linger)) s.settimeout(timeout) try: s.connect((hostname, port)) diff --git a/src/com/dtmilano/android/viewclient.py b/src/com/dtmilano/android/viewclient.py index ee1dfae2..11fb5784 100644 --- a/src/com/dtmilano/android/viewclient.py +++ b/src/com/dtmilano/android/viewclient.py @@ -66,7 +66,7 @@ DEBUG_VIEW_FACTORY = DEBUG and False DEBUG_CHANGE_LANGUAGE = DEBUG and False DEBUG_UI_AUTOMATOR_HELPER = DEBUG and False -DEBUG_NAV_BUTTONS = DEBUG or True +DEBUG_NAV_BUTTONS = DEBUG and False WARNINGS = False