diff --git a/agent/lib/src/adb.dart b/agent/lib/src/adb.dart index ae8f2321ea..578fff213b 100644 --- a/agent/lib/src/adb.dart +++ b/agent/lib/src/adb.dart @@ -84,20 +84,13 @@ class Adb { return results; } - /// Kills and restarts the `adb` server. + /// Kills the `adb` server causing it to start a new instance upon next + /// command. /// /// Restarting `adb` helps with keeping device connections alive. When `adb` /// runs non-stop for too long it loses connections to devices. static Future restart() async { - int exitCode = await exec(config.adbPath, ['kill-server'], canFail: false); - - if (exitCode != 0) - throw 'Failed to kill ADB server'; - - exitCode = await exec(config.adbPath, ['start-server'], canFail: false); - - if (exitCode != 0) - throw 'Failed to start ADB server'; + await exec(config.adbPath, ['kill-server'], canFail: false); } static Future> get deviceIds async { diff --git a/db/schema.go b/db/schema.go index 6ab78b650c..7b477b4c85 100644 --- a/db/schema.go +++ b/db/schema.go @@ -83,7 +83,7 @@ type Task struct { // MaxAttempts is the maximum number of times a single task will be attempted // before giving up on it. -const MaxAttempts = 3 +const MaxAttempts = 2 // TaskStatus indicates the status of a task. type TaskStatus string