Skip to content

Commit

Permalink
Merge pull request #284 from gatesking/patch-1
Browse files Browse the repository at this point in the history
Catch interrupt signal in keepalive thread
  • Loading branch information
hierynomus authored Nov 30, 2016
2 parents ca4e0bf + 3ce7c2e commit cdca43a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/net/schmizz/keepalive/KeepAlive.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ public void run() {
}
Thread.sleep(hi * 1000);
}
} catch (InterruptedException e) {
// Interrupt signal may be catched when sleeping.
} catch (Exception e) {
// If we weren't interrupted, kill the transport, then this exception was unexpected.
// Else we're in shutdown-mode already, so don't forcibly kill the transport.
Expand Down

0 comments on commit cdca43a

Please sign in to comment.