File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
ratis-common/src/main/java/org/apache/ratis/util Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -356,20 +356,11 @@ public synchronized void receiveReply(
356356 }
357357
358358 private void trySendDelayed (Consumer <REQUEST > sendMethod ) {
359+ // We check "firstReplied" in case receiving unexpected replies.
359360 if (firstReplied ) {
360361 // after first received, all other requests can be submitted (out-of-order)
361362 delayedRequests .getAllAndClear ().forEach (
362363 seqNum -> sendMethod .accept (requests .getNonRepliedRequest (seqNum , "trySendDelayed" )));
363- } else {
364- // Otherwise, submit the first only if it is a delayed request
365- final Iterator <REQUEST > i = requests .iterator ();
366- if (i .hasNext ()) {
367- final REQUEST r = i .next ();
368- final Long delayed = delayedRequests .remove (r .getSeqNum ());
369- if (delayed != null ) {
370- sendOrDelayRequest (r , sendMethod );
371- }
372- }
373364 }
374365 }
375366
You can’t perform that action at this time.
0 commit comments