aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/utils/flags.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/utils/flags.go')
-rw-r--r--cmd/utils/flags.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go
index 78d2b44d6..a65a36204 100644
--- a/cmd/utils/flags.go
+++ b/cmd/utils/flags.go
@@ -847,10 +847,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