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
6b38f7e0
Commit
6b38f7e0
authored
Sep 04, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Fix crash with multi workers and QUIT signal
parent
ad651214
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
src/shrpx_connection_handler.cc
src/shrpx_connection_handler.cc
+8
-0
src/shrpx_connection_handler.h
src/shrpx_connection_handler.h
+2
-0
src/shrpx_worker.cc
src/shrpx_worker.cc
+0
-1
No files found.
src/shrpx_connection_handler.cc
View file @
6b38f7e0
...
...
@@ -130,6 +130,13 @@ ConnectionHandler::~ConnectionHandler() {
}
SSL_CTX_free
(
ssl_ctx
);
}
// Free workers before destroying ev_loop
workers_
.
clear
();
for
(
auto
loop
:
worker_loops_
)
{
ev_loop_destroy
(
loop
);
}
}
void
ConnectionHandler
::
set_ticket_keys_to_worker
(
...
...
@@ -181,6 +188,7 @@ void ConnectionHandler::create_worker_thread(size_t num) {
ticket_keys_
);
worker
->
run_async
();
workers_
.
push_back
(
std
::
move
(
worker
));
worker_loops_
.
push_back
(
loop
);
if
(
LOG_ENABLED
(
INFO
))
{
LLOG
(
INFO
,
this
)
<<
"Created thread #"
<<
workers_
.
size
()
-
1
;
...
...
src/shrpx_connection_handler.h
View file @
6b38f7e0
...
...
@@ -127,6 +127,8 @@ private:
// Stores all SSL_CTX objects.
std
::
vector
<
SSL_CTX
*>
all_ssl_ctx_
;
OCSPUpdateContext
ocsp_
;
// ev_loop for each worker
std
::
vector
<
struct
ev_loop
*>
worker_loops_
;
// Worker instances when multi threaded mode (-nN, N >= 2) is used.
std
::
vector
<
std
::
unique_ptr
<
Worker
>>
workers_
;
// Worker instance used when single threaded mode (-n1) is used.
...
...
src/shrpx_worker.cc
View file @
6b38f7e0
...
...
@@ -101,7 +101,6 @@ Worker::Worker(struct ev_loop *loop, SSL_CTX *sv_ssl_ctx, SSL_CTX *cl_ssl_ctx,
Worker
::~
Worker
()
{
ev_async_stop
(
loop_
,
&
w_
);
ev_timer_stop
(
loop_
,
&
mcpool_clear_timer_
);
ev_loop_destroy
(
loop_
);
}
void
Worker
::
schedule_clear_mcpool
()
{
...
...
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