Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
ba90a4aa
Commit
ba90a4aa
authored
Feb 14, 2019
by
Felix Lange
Committed by
Péter Szilágyi
Feb 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common/fdlimit: fix windows build (#19068)
parent
325334f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
fdlimit_windows.go
common/fdlimit/fdlimit_windows.go
+6
-4
No files found.
common/fdlimit/fdlimit_windows.go
View file @
ba90a4aa
...
...
@@ -16,7 +16,9 @@
package
fdlimit
import
"errors"
import
"fmt"
const
hardlimit
=
16384
// Raise tries to maximize the file descriptor allowance of this process
// to the maximum hard-limit allowed by the OS.
...
...
@@ -27,8 +29,8 @@ func Raise(max uint64) (uint64, error) {
// changeable from within a running process
// This way we can always "request" raising the limits, which will either have
// or not have effect based on the platform we're running on.
if
max
>
16384
{
return
errors
.
New
(
"file descriptor limit (16384) reached"
)
if
max
>
hardlimit
{
return
hardlimit
,
fmt
.
Errorf
(
"file descriptor limit (%d) reached"
,
hardlimit
)
}
return
max
,
nil
}
...
...
@@ -37,7 +39,7 @@ func Raise(max uint64) (uint64, error) {
// process.
func
Current
()
(
int
,
error
)
{
// Please see Raise for the reason why we use hard coded 16K as the limit
return
16384
,
nil
return
hardlimit
,
nil
}
// Maximum retrieves the maximum number of file descriptors this process is
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment