diff --git a/flow-client/src/main/java/com/vaadin/client/communication/MessageHandler.java b/flow-client/src/main/java/com/vaadin/client/communication/MessageHandler.java index 09ab36df996..55bfef8b259 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/MessageHandler.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/MessageHandler.java @@ -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(); } diff --git a/flow-client/src/main/java/com/vaadin/client/communication/MessageSender.java b/flow-client/src/main/java/com/vaadin/client/communication/MessageSender.java index 4e89be4e6c0..4a01392237f 100644 --- a/flow-client/src/main/java/com/vaadin/client/communication/MessageSender.java +++ b/flow-client/src/main/java/com/vaadin/client/communication/MessageSender.java @@ -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; } }