Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
levy5307 committed Nov 17, 2020
1 parent 4a2a4b9 commit d9a1c46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ public interface ReplicaSessionInterceptor {
void onConnected(ReplicaSession session);

// The behavior when rpc session is sending a message.
// @returns false if this message shouldn't be sent.
boolean onSendMessage(ReplicaSession session, final ReplicaSession.RequestEntry entry);
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ public void onConnected(ReplicaSession session) {
}

public boolean onSendMessage(ReplicaSession session, final ReplicaSession.RequestEntry entry) {
boolean ret = true;
for (ReplicaSessionInterceptor interceptor : interceptors) {
ret &= interceptor.onSendMessage(session, entry);
if (!interceptor.onSendMessage(session, entry)) {
return false;
}
}
return ret;
return true;
}
}

0 comments on commit d9a1c46

Please sign in to comment.