Skip to content

Commit eb44905

Browse files
committed
fix an exception
1 parent 6077c6a commit eb44905

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

library/src/main/java/com/loopj/android/http/AsyncHttpRequest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,12 @@ public boolean isDone() {
167167
public boolean cancel(boolean mayInterruptIfRunning) {
168168
isCancelled = true;
169169
if (mayInterruptIfRunning && request != null && !request.isAborted()) {
170-
request.abort();
170+
new Thread(new Runnable() {
171+
@Override
172+
public void run() {
173+
request.abort();
174+
}
175+
});
171176
}
172177
return isCancelled();
173178
}

0 commit comments

Comments
 (0)