Skip to content

Commit eb45602

Browse files
committed
Use math.MaxInt32 instead of math.MaxUint32
I think it was original intention, because even half of a comment was about MaxInt32. Fix moby#15038 Signed-off-by: Alexander Morozov <[email protected]>
1 parent 8c9cd04 commit eb45602

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

daemon/logger/fluentd/fluentd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ func New(ctx logger.Context) (logger.Logger, error) {
9393
}
9494
logrus.Debugf("logging driver fluentd configured for container:%s, host:%s, port:%d, tag:%s.", ctx.ContainerID, host, port, tag)
9595

96-
// logger tries to recoonect 2**64 - 1 times
96+
// logger tries to recoonect 2**32 - 1 times
9797
// failed (and panic) after 204 years [ 1.5 ** (2**32 - 1) - 1 seconds]
98-
log, err := fluent.New(fluent.Config{FluentPort: port, FluentHost: host, RetryWait: 1000, MaxRetry: math.MaxUint32})
98+
log, err := fluent.New(fluent.Config{FluentPort: port, FluentHost: host, RetryWait: 1000, MaxRetry: math.MaxInt32})
9999
if err != nil {
100100
return nil, err
101101
}

0 commit comments

Comments
 (0)