diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2014-07-16 15:49:40 +0200 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2014-07-16 15:49:40 +0200 |
commit | 6db29788b0f4582b1ca480983a44e9f7bb86e5df (patch) | |
tree | 2c5a5f800d6b1f0e2a3977a761bc7dc5e86d5f0f | |
parent | b369d78337f45ace487f302693fdbc8dd07443b1 (diff) |
Fix ffdb.py to automatically attempt adb port forward when error 107 'Transport endpoint is not connected' is received.
-rwxr-xr-x | tools/ffdb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/ffdb.py b/tools/ffdb.py index a948c700..777e7cbc 100755 --- a/tools/ffdb.py +++ b/tools/ffdb.py @@ -562,7 +562,7 @@ def main(): try: b2g_socket.connect((HOST, PORT)) except Exception, e: - if e[0] == 61: # Connection refused + if e[0] == 61 or e[0] == 107: # 61 == Connection refused and 107 == Transport endpoint is not connected if (HOST == 'localhost' or HOST == '127.0.0.1') and not connect_to_simulator: cmd = [ADB, 'forward', 'tcp:'+str(PORT), 'localfilesystem:/data/local/debugger-socket'] print 'Connection to ' + HOST + ':' + str(PORT) + ' refused, attempting to forward device debugger-socket to local address by calling ' + str(cmd) + ':' |