Skip to content
This repository was archived by the owner on Sep 28, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions src/main/java/io/kuzzle/sdk/Kuzzle.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,15 @@ protected void onResponseReceived(final Object... payload) {
return;
}

if (response.error.id == null
|| !response.error.id.equals("security.token.expired")) {
final Task<Response> task = requests.get(response.requestId);
if (task != null) {
task.setException(new ApiErrorException(response));
}
return;
final Task<Response> task = requests.get(response.requestId);
if (task != null) {
task.setException(new ApiErrorException(response));
}
requests.remove(response.requestId);

super.trigger(Event.tokenExpired);
if (response.error.id != null && response.error.id.equals("security.token.expired")) {
super.trigger(Event.tokenExpired);
}
}

protected void onStateChanged(final Object... args) {
Expand Down