Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nghttp2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
nghttp2
Commits
2f994632
Commit
2f994632
authored
Jan 19, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Fix bug that --listener-disable-timeout option is not used
parent
0402481b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
3 deletions
+12
-3
src/shrpx.cc
src/shrpx.cc
+1
-0
src/shrpx_accept_handler.cc
src/shrpx_accept_handler.cc
+1
-1
src/shrpx_connection_handler.cc
src/shrpx_connection_handler.cc
+1
-1
src/shrpx_connection_handler.h
src/shrpx_connection_handler.h
+1
-1
src/template.h
src/template.h
+8
-0
No files found.
src/shrpx.cc
View file @
2f994632
...
...
@@ -1032,6 +1032,7 @@ void fill_default_config() {
// Default accept() backlog
listenerconf
.
backlog
=
512
;
listenerconf
.
host_unix
=
false
;
listenerconf
.
timeout
.
sleep
=
30
_s
;
}
}
...
...
src/shrpx_accept_handler.cc
View file @
2f994632
...
...
@@ -87,7 +87,7 @@ void AcceptHandler::accept_connection() {
case
ENFILE
:
LOG
(
WARN
)
<<
"acceptor: running out file descriptor; disable acceptor "
"temporarily"
;
conn_hnr_
->
disable_acceptor_temporary
(
30.
);
conn_hnr_
->
sleep_acceptor
(
get_config
()
->
conn
.
listener
.
timeout
.
sleep
);
break
;
}
...
...
src/shrpx_connection_handler.cc
View file @
2f994632
...
...
@@ -385,7 +385,7 @@ void ConnectionHandler::disable_acceptor() {
}
}
void
ConnectionHandler
::
disable_acceptor_temporary
(
ev_tstamp
t
)
{
void
ConnectionHandler
::
sleep_acceptor
(
ev_tstamp
t
)
{
if
(
t
==
0.
||
ev_is_active
(
&
disable_acceptor_timer_
))
{
return
;
}
...
...
src/shrpx_connection_handler.h
View file @
2f994632
...
...
@@ -98,7 +98,7 @@ public:
AcceptHandler
*
get_acceptor6
()
const
;
void
enable_acceptor
();
void
disable_acceptor
();
void
disable_acceptor_temporary
(
ev_tstamp
t
);
void
sleep_acceptor
(
ev_tstamp
t
);
void
accept_pending_connection
();
void
graceful_shutdown_worker
();
void
set_graceful_shutdown
(
bool
f
);
...
...
src/template.h
View file @
2f994632
...
...
@@ -171,10 +171,18 @@ constexpr unsigned long long operator"" _g(unsigned long long g) {
// User-defined literals for time, converted into double in seconds
// hours
constexpr
double
operator
""
_h
(
unsigned
long
long
h
)
{
return
h
*
60
*
60
;
}
// minutes
constexpr
double
operator
""
_min
(
unsigned
long
long
min
)
{
return
min
*
60
;
}
// seconds
constexpr
double
operator
""
_s
(
unsigned
long
long
s
)
{
return
s
;
}
// milliseconds
constexpr
double
operator
""
_ms
(
unsigned
long
long
ms
)
{
return
ms
/
1000.
;
}
// Returns a copy of NULL-terminated string [first, last).
template
<
typename
InputIt
>
std
::
unique_ptr
<
char
[]
>
strcopy
(
InputIt
first
,
InputIt
last
)
{
...
...
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