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(
356
356
}
357
357
358
358
private void trySendDelayed (Consumer <REQUEST > sendMethod ) {
359
+ // We check "firstReplied" in case receiving unexpected replies.
359
360
if (firstReplied ) {
360
361
// after first received, all other requests can be submitted (out-of-order)
361
362
delayedRequests .getAllAndClear ().forEach (
362
363
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
- }
373
364
}
374
365
}
375
366
You can’t perform that action at this time.
0 commit comments