Skip to content

Commit

Permalink
chore: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mshabarov committed May 18, 2022
1 parent b8b393a commit 7d98249
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,8 @@ private void forceMessageHandling() {
registry.getRequestResponseTracker().endRequest();
}

// Call resynchronize to make sure a resynchronize request is sent in
// Call resynchronize to make sure a resynchronize request is sent
// in
// case endRequest did not already do this.
registry.getMessageSender().resynchronize();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,23 +277,27 @@ public void setClientToServerMessageId(int nextExpectedId, boolean force) {
}

/**
* Modifies the resynchronize state to indicate that resynchronization is desired
* Modifies the resynchronize state to indicate that resynchronization is
* desired
*
* @return true if the resynchronize request still needs to be sent; false otherwise
* @return true if the resynchronize request still needs to be sent; false
* otherwise
*/
boolean requestResynchronize() {
switch (resynchronizationState) {
case NOT_ACTIVE:
Console.log("Resynchronize from server requested");
resynchronizationState = ResynchronizationState.SEND_TO_SERVER;
return true;
case SEND_TO_SERVER:
// Resynchronize has already been requested, but hasn't been sent yet
return true;
case WAITING_FOR_RESPONSE:
default:
// Resynchronize has already been requested, but response hasn't been received yet
return false;
case NOT_ACTIVE:
Console.log("Resynchronize from server requested");
resynchronizationState = ResynchronizationState.SEND_TO_SERVER;
return true;
case SEND_TO_SERVER:
// Resynchronize has already been requested, but hasn't been sent
// yet
return true;
case WAITING_FOR_RESPONSE:
default:
// Resynchronize has already been requested, but response hasn't
// been received yet
return false;
}
}

Expand Down

0 comments on commit 7d98249

Please sign in to comment.