Compare commits
2 Commits
d743f8f2b2
...
a88eda357c
Author | SHA1 | Date |
---|---|---|
Shadowfacts | a88eda357c | |
Shadowfacts | 7034ce11ef |
|
@ -164,8 +164,8 @@ class TerminalBlockEntity: DeviceBlockEntity(PhyBlockEntities.TERMINAL),
|
|||
if (pendingRequests.isEmpty()) return
|
||||
|
||||
val finishable = pendingRequests.filter { it.isFinishable(counter) }
|
||||
// stackLocateRequestCompleted removes the object from pendingRequests
|
||||
finishable.forEach(::stackLocateRequestCompleted)
|
||||
pendingRequests.removeAll(finishable)
|
||||
}
|
||||
|
||||
fun addObserver() {
|
||||
|
|
|
@ -75,7 +75,7 @@ fun <Self, Insertion: NetworkStackDispatcher.PendingInsertion<Insertion>> Self.f
|
|||
if (pendingInsertions.isEmpty()) return
|
||||
|
||||
val finishable = pendingInsertions.filter { it.isFinishable(this) }
|
||||
// finishInsertion removes the object from pendingInsertions
|
||||
finishable.forEach(::finishInsertion)
|
||||
pendingInsertions.removeAll(finishable)
|
||||
// todo: if a timed-out insertion can't be finished, we should probably retry after some time (exponential backoff?)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue