Skip to content

Commit f4cbff2

Browse files
committed
Merge pull request android-async-http#533 from superdry/fix
fix an exception
2 parents a15fb92 + eb44905 commit f4cbff2

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

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)