mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 18:37:45 +08:00
fix(rcmgr): improve error phrasing
limits were not exceeded, manager protects us from that https://github.com/ipfs/kubo/issues/9432#issuecomment-1334160936
This commit is contained in:
parent
c8a4b6ae00
commit
09765951ea
@ -50,7 +50,7 @@ func (n *loggingResourceManager) start(ctx context.Context) {
|
||||
n.limitExceededErrs = make(map[string]int)
|
||||
|
||||
for e, count := range errs {
|
||||
n.logger.Errorf("Resource limits were exceeded %d times with error %q.", count, e)
|
||||
n.logger.Errorf("Protected from exceeding resource limits %d times: %q.", count, e)
|
||||
}
|
||||
|
||||
if len(errs) != 0 {
|
||||
|
||||
@ -55,7 +55,7 @@ func TestLoggingResourceManager(t *testing.T) {
|
||||
if oLogs.Len() == 0 {
|
||||
continue
|
||||
}
|
||||
require.Equal(t, "Resource limits were exceeded 2 times with error \"system: cannot reserve inbound connection: resource limit exceeded\".", oLogs.All()[0].Message)
|
||||
require.Equal(t, "Protected from exceeding resource limits 2 times: \"system: cannot reserve inbound connection: resource limit exceeded\".", oLogs.All()[0].Message)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user