Skip to content

Commit

Permalink
Attempt reconnect when connection to websocket fails, and pass down c…
Browse files Browse the repository at this point in the history
…onnection exceptions to created Multi
  • Loading branch information
rubik-cube-man authored and jmartisk committed Sep 11, 2023
1 parent fd73c21 commit 2dcc266
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ private Uni<WebSocketSubprotocolHandler> webSocketHandler() {
handlerEmitter.complete(handler);
log.debug("Using websocket subprotocol handler: " + handler);
} else {
webSocketHandler.set(null);
handlerEmitter.fail(result.cause());
}
});
Expand Down Expand Up @@ -460,7 +461,7 @@ private Multi<Response> executeSubscriptionOverWebsocket(JsonObject json) {
webSocketHandler().subscribe().with(handler -> {
handlerRef.set(handler);
operationId.set(handler.executeMulti(json, rawEmitter));
});
}, rawEmitter::fail);
});
return rawMulti
.onCancellation().invoke(() -> {
Expand Down

0 comments on commit 2dcc266

Please sign in to comment.