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
c78e0ca0
Commit
c78e0ca0
authored
Sep 15, 2012
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shrpx: Log when SPDY stream is closed
parent
7f481e42
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
src/shrpx_accesslog.cc
src/shrpx_accesslog.cc
+14
-0
src/shrpx_accesslog.h
src/shrpx_accesslog.h
+2
-0
src/shrpx_spdy_upstream.cc
src/shrpx_spdy_upstream.cc
+4
-0
No files found.
src/shrpx_accesslog.cc
View file @
c78e0ca0
...
...
@@ -74,4 +74,18 @@ void upstream_spdy_stream(const std::string& client_ip, int32_t stream_id)
}
}
void
upstream_spdy_stream_close
(
const
std
::
string
&
client_ip
,
int32_t
stream_id
)
{
char
datestr
[
64
];
get_datestr
(
datestr
);
fprintf
(
stderr
,
"[%s] %s SPDY stream_id=%d closed
\n
"
,
datestr
,
client_ip
.
c_str
(),
stream_id
);
fflush
(
stderr
);
if
(
get_config
()
->
use_syslog
)
{
syslog
(
LOG_INFO
,
"%s SPDY stream_id=%d closed
\n
"
,
client_ip
.
c_str
(),
stream_id
);
}
}
}
// namespace shrpx
src/shrpx_accesslog.h
View file @
c78e0ca0
...
...
@@ -33,6 +33,8 @@ namespace shrpx {
void
upstream_connect
(
const
std
::
string
&
client_ip
);
void
upstream_spdy_stream
(
const
std
::
string
&
client_ip
,
int32_t
stream_id
);
void
upstream_spdy_stream_close
(
const
std
::
string
&
client_ip
,
int32_t
stream_id
);
}
// namespace shrpx
...
...
src/shrpx_spdy_upstream.cc
View file @
c78e0ca0
...
...
@@ -98,6 +98,10 @@ void on_stream_close_callback
}
SpdyUpstream
*
upstream
=
reinterpret_cast
<
SpdyUpstream
*>
(
user_data
);
Downstream
*
downstream
=
upstream
->
find_downstream
(
stream_id
);
if
(
get_config
()
->
accesslog
)
{
upstream_spdy_stream_close
(
upstream
->
get_client_handler
()
->
get_ipaddr
(),
stream_id
);
}
if
(
downstream
)
{
if
(
downstream
->
get_request_state
()
==
Downstream
::
CONNECT_FAIL
)
{
upstream
->
remove_downstream
(
downstream
);
...
...
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