Skip to content

Commit

Permalink
simpler connection
Browse files Browse the repository at this point in the history
  • Loading branch information
rpurdel committed May 17, 2024
1 parent d8c0411 commit 2768eb3
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,7 @@ void connect()
upgradeRequest.setHeader("Authorization", "Bearer " + getJWT());
ws = new WebSocketClient();
ws.start();
CompletableFuture<Session> connectFuture = ws.connect(this, new URI(websocketUrl), upgradeRequest);
wsSession = connectFuture.get();
wsSession = ws.connect(this, new URI(websocketUrl), upgradeRequest).get();
wsSession.setIdleTimeout(Duration.ofSeconds(300));
isConnected = true;
logger.info("Successfully connected to " + websocketUrl);
Expand Down

0 comments on commit 2768eb3

Please sign in to comment.