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
264a98d1
Commit
264a98d1
authored
Dec 10, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Call c-ares initialization/cleanup functions
parent
7c11d2d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
src/shrpx_worker_process.cc
src/shrpx_worker_process.cc
+11
-2
No files found.
src/shrpx_worker_process.cc
View file @
264a98d1
...
@@ -39,6 +39,8 @@
...
@@ -39,6 +39,8 @@
#include <ev.h>
#include <ev.h>
#include <ares.h>
#include "shrpx_config.h"
#include "shrpx_config.h"
#include "shrpx_connection_handler.h"
#include "shrpx_connection_handler.h"
#include "shrpx_log_config.h"
#include "shrpx_log_config.h"
...
@@ -392,6 +394,7 @@ std::random_device rd;
...
@@ -392,6 +394,7 @@ std::random_device rd;
}
// namespace
}
// namespace
int
worker_process_event_loop
(
WorkerProcessConfig
*
wpconf
)
{
int
worker_process_event_loop
(
WorkerProcessConfig
*
wpconf
)
{
int
rv
;
std
::
array
<
char
,
STRERROR_BUFSIZE
>
errbuf
;
std
::
array
<
char
,
STRERROR_BUFSIZE
>
errbuf
;
(
void
)
errbuf
;
(
void
)
errbuf
;
...
@@ -400,6 +403,12 @@ int worker_process_event_loop(WorkerProcessConfig *wpconf) {
...
@@ -400,6 +403,12 @@ int worker_process_event_loop(WorkerProcessConfig *wpconf) {
return
-
1
;
return
-
1
;
}
}
rv
=
ares_library_init
(
ARES_LIB_INIT_ALL
);
if
(
rv
!=
0
)
{
LOG
(
FATAL
)
<<
"ares_library_init failed: "
<<
ares_strerror
(
rv
);
return
-
1
;
}
auto
loop
=
EV_DEFAULT
;
auto
loop
=
EV_DEFAULT
;
auto
gen
=
std
::
mt19937
(
rd
());
auto
gen
=
std
::
mt19937
(
rd
());
...
@@ -494,8 +503,6 @@ int worker_process_event_loop(WorkerProcessConfig *wpconf) {
...
@@ -494,8 +503,6 @@ int worker_process_event_loop(WorkerProcessConfig *wpconf) {
}
}
}
}
int
rv
;
if
(
config
->
num_worker
==
1
)
{
if
(
config
->
num_worker
==
1
)
{
rv
=
conn_handler
.
create_single_worker
();
rv
=
conn_handler
.
create_single_worker
();
if
(
rv
!=
0
)
{
if
(
rv
!=
0
)
{
...
@@ -575,6 +582,8 @@ int worker_process_event_loop(WorkerProcessConfig *wpconf) {
...
@@ -575,6 +582,8 @@ int worker_process_event_loop(WorkerProcessConfig *wpconf) {
}
}
#endif // HAVE_NEVERBLEED
#endif // HAVE_NEVERBLEED
ares_library_cleanup
();
return
0
;
return
0
;
}
}
...
...
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