Skip to content

Commit

Permalink
Merge pull request #84 from tryptichon/master
Browse files Browse the repository at this point in the history
Version 2.2.1
  • Loading branch information
mglusiuk authored Jul 17, 2020
2 parents e068242 + 8c1502c commit f838f81
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
| --------------- | ------ | ----------------------- |
| 1.6.x | 1.6 | 6.1.x |
| 2.0.x | master | 7.0.x |
| 2.1.x | master | 7.1.x |
| 2.2.x | master | 7.1.x |
4 changes: 2 additions & 2 deletions java/hiro-action-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<groupId>co.arago</groupId>
<artifactId>hiro-action-client</artifactId>
<name>${project.artifactId}</name>
<version>2.2.0</version>
<version>2.2.1</version>
<parent>
<groupId>co.arago</groupId>
<artifactId>hiro-client-all</artifactId>
<version>2.2.0</version>
<version>2.2.1</version>
</parent>

<properties>
Expand Down
4 changes: 2 additions & 2 deletions java/hiro-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
<groupId>co.arago</groupId>
<artifactId>hiro-client</artifactId>
<name>${project.artifactId}</name>
<version>2.2.0</version>
<version>2.2.1</version>
<parent>
<groupId>co.arago</groupId>
<artifactId>hiro-client-all</artifactId>
<version>2.2.0</version>
<version>2.2.1</version>
</parent>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,7 @@ private void connect(boolean isReconnecting) {
LOG.log(Level.FINEST, "connecting " + this);
}

WebSocketUpgradeHandler.Builder upgradeHandlerBuilder = new WebSocketUpgradeHandler.Builder();

WebSocketUpgradeHandler wsHandler = upgradeHandlerBuilder
WebSocketUpgradeHandler wsHandler = new WebSocketUpgradeHandler.Builder()
.addWebSocketListener(new DefaultWebSocketListener(isReconnecting)).build();

try {
Expand Down Expand Up @@ -265,19 +263,24 @@ private void connect(boolean isReconnecting) {
* InterruptedException while sleeping.
*/
private synchronized void reconnect() {
if (!running) {
return;
}

Duration nextTryDelay = Duration.ZERO;

closeWs();

while (true) {
try {
long delay = nextTryDelay.getSeconds() * 1000;
if (delay > 0)
wait(delay);

if (!running) {
return;
}

long delay = nextTryDelay.getSeconds() * 1000;
Thread.sleep(delay);

if (LOG.isLoggable(Level.INFO)) {
LOG.log(Level.INFO, "Reconnecting " + this);
}
Expand Down Expand Up @@ -426,6 +429,7 @@ public synchronized long sendMessage(String type, Map<String, String> headers, M
public synchronized void close() {
running = false;

notifyAll();
closeWs();

executor.shutdownNow();
Expand Down
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<artifactId>hiro-client-all</artifactId>
<name>${project.artifactId}</name>
<packaging>pom</packaging>
<version>2.2.0</version>
<version>2.2.1</version>

<properties>
<maven.exec.skip>false</maven.exec.skip>
Expand Down

0 comments on commit f838f81

Please sign in to comment.