mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
check if future is null
This commit is contained in:
@@ -32,6 +32,10 @@ public class Rpc {
|
||||
}
|
||||
|
||||
CompletableFuture<JsonElement> future = requestFutures.remove(response.id);
|
||||
if (future == null) { // Got a response with unknown ID, ignore
|
||||
return;
|
||||
}
|
||||
|
||||
if (response.error != null) {
|
||||
future.completeExceptionally(new RpcError(response.error.toString()));
|
||||
} else if (response.result != null) {
|
||||
|
||||
Reference in New Issue
Block a user