Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/main/java/org/java_websocket/client/WebSocketClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,21 @@ public boolean reconnectBlocking() throws InterruptedException {
return connectBlocking();
}

/**
* Same as <code>reconnect</code> but blocks with a timeout until the websocket connected or failed
* to do so.<br>
*
* @param timeout The connect timeout
* @param timeUnit The timeout time unit
* @return Returns whether it succeeded or not.
* @throws InterruptedException Thrown when the threads get interrupted
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add

   * @since 1.6.1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

* @since 1.6.1
*/
public boolean reconnectBlocking(long timeout, TimeUnit timeUnit) throws InterruptedException {
reset();
return connectBlocking(timeout, timeUnit);
}

/**
* Reset everything relevant to allow a reconnect
*
Expand Down