Skip to content

Commit

Permalink
Ensure all members send heartbeats to maintain sessions.
Browse files Browse the repository at this point in the history
  • Loading branch information
kuujo committed Jun 11, 2015
1 parent 4ba7e3d commit 1921bd7
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -522,10 +522,10 @@ private CompletableFuture<Void> heartbeat(List<Member> members, CompletableFutur
* Sends a heartbeat to a specific member.
*/
private CompletableFuture<Void> heartbeat(Member member, List<Member> members, CompletableFuture<Void> future) {
KeepAliveRequest request = KeepAliveRequest.builder()
.withSession(getSession())
HeartbeatRequest request = HeartbeatRequest.builder()
.withMember(cluster.member().id())
.build();
member.<KeepAliveRequest, KeepAliveResponse>send(request).whenComplete((response, error) -> {
member.<HeartbeatRequest, HeartbeatResponse>send(request).whenComplete((response, error) -> {
threadChecker.checkThread();
if (isOpen()) {
if (error == null && response.status() == Response.Status.OK) {
Expand Down

0 comments on commit 1921bd7

Please sign in to comment.