Fixes - OkHttpWebsocketTransport should fail instead of failMessages for websocket failure.
Calling fail() to ensure that the WebSocket connection is closed.
@@ -237,8 +237,9 @@ public class OkHttpWebsocketTransport extends AbstractWebSocketTransport {
@Override
public void onFailure(WebSocket webSocket, Throwable failure, Response response) {
- if (!connectFuture.complete(failure))
- OkHttpDelegate.this.failMessages(failure);
+ if (!connectFuture.complete(failure)) {
+ OkHttpDelegate.this.fail(failure, "WebSocketListener Failure");
+ }
}
}
}
