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
8925c58d
Commit
8925c58d
authored
Feb 08, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shrpx: Send RST_STREAM when downstream becomes stale
parent
9b424536
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
src/shrpx_spdy_downstream_connection.cc
src/shrpx_spdy_downstream_connection.cc
+30
-3
src/shrpx_spdy_downstream_connection.h
src/shrpx_spdy_downstream_connection.h
+2
-0
No files found.
src/shrpx_spdy_downstream_connection.cc
View file @
8925c58d
...
...
@@ -59,7 +59,11 @@ SpdyDownstreamConnection::~SpdyDownstreamConnection()
if
(
request_body_buf_
)
{
evbuffer_free
(
request_body_buf_
);
}
// TODO need RST_STREAM?
if
(
downstream_
)
{
if
(
submit_rst_stream
(
downstream_
)
==
0
)
{
spdy_
->
notify
();
}
}
spdy_
->
remove_downstream_connection
(
this
);
// Downstream and DownstreamConnection may be deleted
// asynchronously.
...
...
@@ -110,14 +114,37 @@ void SpdyDownstreamConnection::detach_downstream(Downstream *downstream)
if
(
LOG_ENABLED
(
INFO
))
{
DCLOG
(
INFO
,
this
)
<<
"Detaching from DOWNSTREAM:"
<<
downstream
;
}
if
(
submit_rst_stream
(
downstream
)
==
0
)
{
spdy_
->
notify
();
}
downstream
->
set_downstream_connection
(
0
);
downstream_
=
0
;
// TODO do something to SpdySession? RST_STREAM?
client_handler_
->
pool_downstream_connection
(
this
);
}
int
SpdyDownstreamConnection
::
submit_rst_stream
(
Downstream
*
downstream
)
{
int
rv
=
-
1
;
if
(
spdy_
->
get_state
()
==
SpdySession
::
CONNECTED
&&
downstream
->
get_downstream_stream_id
()
!=
-
1
)
{
switch
(
downstream
->
get_response_state
())
{
case
Downstream
:
:
MSG_RESET
:
case
Downstream
:
:
MSG_COMPLETE
:
break
;
default:
if
(
LOG_ENABLED
(
INFO
))
{
DCLOG
(
INFO
,
this
)
<<
"Submit RST_STREAM for DOWNSTREAM:"
<<
downstream
;
}
rv
=
spdy_
->
submit_rst_stream
(
this
,
downstream
->
get_downstream_stream_id
(),
SPDYLAY_CANCEL
);
}
}
return
rv
;
}
namespace
{
ssize_t
spdy_data_read_callback
(
spdylay_session
*
session
,
int32_t
stream_id
,
...
...
src/shrpx_spdy_downstream_connection.h
View file @
8925c58d
...
...
@@ -66,6 +66,8 @@ public:
void
attach_stream_data
(
StreamData
*
sd
);
StreamData
*
detach_stream_data
();
int
submit_rst_stream
(
Downstream
*
downstream
);
int32_t
get_recv_window_size
()
const
;
void
inc_recv_window_size
(
int32_t
amount
);
private:
...
...
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