[FIX] Фикс CastException

This commit is contained in:
Gravit 2019-11-09 11:53:15 +07:00
parent 888a3a92d9
commit 35f71f6797
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -65,7 +65,7 @@ public WebSocketEvent get() throws InterruptedException, ExecutionException {
} }
WebSocketEvent result = event.result; WebSocketEvent result = event.result;
waitEventHandler.requests.remove(event); waitEventHandler.requests.remove(event);
if (event.result.getType().equals("error") || event.result.getType().equals("exception")) { if (event.result.getType().equals("error")) {
ErrorRequestEvent errorRequestEvent = (ErrorRequestEvent) event.result; ErrorRequestEvent errorRequestEvent = (ErrorRequestEvent) event.result;
throw new ExecutionException(new RequestException(errorRequestEvent.error)); throw new ExecutionException(new RequestException(errorRequestEvent.error));
} }