mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
cmd/utils: make fdlimit happy path a bit cleaner
This commit is contained in:
parent
79c6d99e0e
commit
5e7f3526eb
1 changed files with 3 additions and 4 deletions
|
|
@ -950,12 +950,11 @@ func makeDatabaseHandles() int {
|
|||
if err != nil {
|
||||
Fatalf("Failed to retrieve file descriptor allowance: %v", err)
|
||||
}
|
||||
if u64limit, 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 0 // Make the compiler happy
|
||||
} else {
|
||||
return int(u64limit / 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue