Skip to content

Commit c6af6a5

Browse files
committed
修复状态问题:导致无法监听异常
1 parent 5244b06 commit c6af6a5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

AndroidExecLibrary/src/main/java/com/excellence/exec/CommandTask.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private void restartTimer() {
200200
@Override
201201
public void accept(Long aLong) throws Exception {
202202
mIListener.onError(new Throwable("Time out : " + mCmd));
203-
discard();
203+
interrupt();
204204
}
205205
});
206206
}
@@ -226,6 +226,11 @@ private void remove() {
226226
mManager.remove(this);
227227
}
228228

229+
private void interrupt() {
230+
killProcess();
231+
remove();
232+
}
233+
229234
public void discard() {
230235
mStatus = STATUS_INTERRUPT;
231236
killProcess();

0 commit comments

Comments
 (0)