Calling listener in case of erorr
This commit is contained in:
parent
4f64391e00
commit
e9047b55ce
1 changed files with 2 additions and 0 deletions
|
@ -137,12 +137,14 @@ public class GetRelativeAccountHistory extends WebSocketAdapter {
|
||||||
@Override
|
@Override
|
||||||
public void onError(WebSocket websocket, WebSocketException cause) throws Exception {
|
public void onError(WebSocket websocket, WebSocketException cause) throws Exception {
|
||||||
System.out.println("onError. Msg: "+cause.getMessage());
|
System.out.println("onError. Msg: "+cause.getMessage());
|
||||||
|
mListener.onError(new BaseResponse.Error(cause.getMessage()));
|
||||||
websocket.disconnect();
|
websocket.disconnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleCallbackError(WebSocket websocket, Throwable cause) throws Exception {
|
public void handleCallbackError(WebSocket websocket, Throwable cause) throws Exception {
|
||||||
System.out.println("handleCallbackError. Msg: "+cause.getMessage());
|
System.out.println("handleCallbackError. Msg: "+cause.getMessage());
|
||||||
|
mListener.onError(new BaseResponse.Error(cause.getMessage()));
|
||||||
websocket.disconnect();
|
websocket.disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue