notify the listener if the request gets cancelled

This commit is contained in:
javanna 2016-07-19 17:32:12 +02:00 committed by Luca Cavanna
parent a9b5c5adbe
commit 569d7b3ecc
1 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,7 @@ import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
@ -346,6 +347,7 @@ public final class RestClient implements Closeable {
@Override
public void cancelled() {
listener.onDefinitiveFailure(new ExecutionException("request was cancelled", null));
}
});
}