diff options
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r-- | cmd/utils/flags.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 66f533102..22b7eb3d2 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -950,10 +950,11 @@ func makeDatabaseHandles() int { if err != nil { Fatalf("Failed to retrieve file descriptor allowance: %v", err) } - if err := fdlimit.Raise(uint64(limit)); err != nil { + raised, err := fdlimit.Raise(uint64(limit)) + if err != nil { Fatalf("Failed to raise file descriptor allowance: %v", err) } - return limit / 2 // Leave half for networking and other stuff + return int(raised / 2) // Leave half for networking and other stuff } // MakeAddress converts an account specified directly as a hex encoded string or |