Skip to content

Commit

Permalink
got rid of extra call to flush which was failing for proxies
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Hightower committed Jul 9, 2015
1 parent 8321d34 commit 9750f03
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,9 @@ private void heathCheck() {
}

private void flushReplicas() {
ServiceProxyUtils.flushServiceProxy(replica);
replica.flush();
if (!ServiceProxyUtils.flushServiceProxy(replica)) {
replica.flush();
}
}

private void flushMinuteCheck() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,13 @@
*/
public class ServiceProxyUtils {

public static void flushServiceProxy(Object object) {
public static boolean flushServiceProxy(Object object) {
if (object instanceof ClientProxy) {
((ClientProxy) object).clientProxyFlush();
return true;
} else {
return false;
}

}
}

0 comments on commit 9750f03

Please sign in to comment.