Add more error checking for ndc
In NativeDaemonConnector.doCommand() calls, there was inconsistent error checking. This change adds error checking for every call and makes it so that any call to .doCommand() that gets an error code won't cause the code to hang forever. Change-Id: I4584953a759a48ad16adfe8ee9e564b5f5796680
This commit is contained in:
@@ -128,13 +128,12 @@ final class NativeDaemonConnector implements Runnable {
|
|||||||
Slog.e(TAG, String.format(
|
Slog.e(TAG, String.format(
|
||||||
"Error handling '%s'", event), ex);
|
"Error handling '%s'", event), ex);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
try {
|
try {
|
||||||
mResponseQueue.put(event);
|
mResponseQueue.put(event);
|
||||||
} catch (InterruptedException ex) {
|
} catch (InterruptedException ex) {
|
||||||
Slog.e(TAG, "Failed to put response onto queue", ex);
|
Slog.e(TAG, "Failed to put response onto queue", ex);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (NumberFormatException nfe) {
|
} catch (NumberFormatException nfe) {
|
||||||
Slog.w(TAG, String.format("Bad msg (%s)", event));
|
Slog.w(TAG, String.format("Bad msg (%s)", event));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user