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
a08ce38b
Commit
a08ce38b
authored
Jan 15, 2015
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpd: Cache date by comparing ev_now
parent
5d204fc3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
15 deletions
+0
-15
src/HttpServer.cc
src/HttpServer.cc
+0
-15
No files found.
src/HttpServer.cc
View file @
a08ce38b
...
...
@@ -1329,20 +1329,9 @@ void worker_acceptcb(struct ev_loop *loop, ev_async *w, int revents) {
}
}
// namespace
namespace
{
void
refresh_cb
(
struct
ev_loop
*
loop
,
ev_timer
*
w
,
int
revents
)
{
auto
sessions
=
static_cast
<
Sessions
*>
(
w
->
data
);
sessions
->
update_cached_date
();
}
}
// namespace
namespace
{
void
run_worker
(
Worker
*
worker
)
{
auto
loop
=
worker
->
sessions
->
get_loop
();
ev_timer
w
;
ev_timer_init
(
&
w
,
refresh_cb
,
0.
,
1.
);
w
.
data
=
worker
->
sessions
.
get
();
ev_timer_again
(
loop
,
&
w
);
worker
->
sessions
->
update_cached_date
();
ev_run
(
loop
,
0
);
...
...
@@ -1672,11 +1661,7 @@ int HttpServer::run() {
return
-
1
;
}
ev_timer
refresh_timer
;
ev_timer_init
(
&
refresh_timer
,
refresh_cb
,
0.
,
1.
);
refresh_timer
.
data
=
&
sessions
;
if
(
config_
->
num_worker
==
1
)
{
ev_timer_again
(
loop
,
&
refresh_timer
);
sessions
.
update_cached_date
();
}
...
...
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