summaryrefslogtreecommitdiff
path: root/same/src/main/java
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-04-10 15:18:41 +0200
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-04-10 15:18:41 +0200
commiteeb1dc14b36a4b2a63f9a1789ee8e12c334b2478 (patch)
tree1d93fcb0dba3a3dae16f89cdfeaa4dc6c28f41d0 /same/src/main/java
parent72101219235a9e4858a0d585d8278581b67c11f0 (diff)
Always run done() in protobuf services.
Diffstat (limited to 'same/src/main/java')
-rw-r--r--same/src/main/java/com/orbekk/same/Client.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/same/src/main/java/com/orbekk/same/Client.java b/same/src/main/java/com/orbekk/same/Client.java
index 704dc8e..bd13576 100644
--- a/same/src/main/java/com/orbekk/same/Client.java
+++ b/same/src/main/java/com/orbekk/same/Client.java
@@ -113,6 +113,7 @@ public class Client {
new State.Component(request.getId(), request.getRevision(),
request.getData()));
}
+ done.run(Empty.getDefaultInstance());
}
@Override public void masterTakeover(RpcController controller,
@@ -129,6 +130,7 @@ public class Client {
Client.this.masterUrl = request.getMasterUrl();
Client.this.masterId = request.getMasterId();
connectionState = ConnectionState.STABLE;
+ done.run(Empty.getDefaultInstance());
}
@Override public void masterDown(RpcController controller, MasterState request,
@@ -141,6 +143,7 @@ public class Client {
logger.warn("Master down.");
connectionState = ConnectionState.UNSTABLE;
tryBecomeMaster(request.getMasterId());
+ done.run(Empty.getDefaultInstance());
}
};