Skip to content

Commit a114cd5

Browse files
committed
[FAB-4613] Warning logs flooding in orderer and peers
https://gerrit.hyperledger.org/r/#/c/10471/ fixed this issue to some extent, but the overflow issue would break the retry mechanism. This changeset is to prevent float overflow Change-Id: I2670d9769f59ef71127e003ef27e36a11008a9a3 Signed-off-by: Xi Xue Jia <[email protected]>
1 parent 97e3ae6 commit a114cd5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/deliverservice/blocksprovider/blocksprovider.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ func (b *blocksProviderImpl) DeliverBlocks() {
155155
maxDelay := float64(maxRetryDelay)
156156
currDelay := float64(time.Duration(math.Pow(2, float64(statusCounter))) * 100 * time.Millisecond)
157157
time.Sleep(time.Duration(math.Min(maxDelay, currDelay)))
158-
statusCounter++
158+
if currDelay < maxDelay {
159+
statusCounter++
160+
}
159161
b.client.Disconnect()
160162
continue
161163
case *orderer.DeliverResponse_Block:

0 commit comments

Comments
 (0)