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
e871768d
Commit
e871768d
authored
Jun 10, 2012
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Disable read for downstream by default to avoid timeout before request
parent
c29dd0b8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
examples/shrpx_downstream_connection.cc
examples/shrpx_downstream_connection.cc
+2
-2
examples/shrpx_https_upstream.cc
examples/shrpx_https_upstream.cc
+1
-0
examples/shrpx_spdy_upstream.cc
examples/shrpx_spdy_upstream.cc
+2
-0
No files found.
examples/shrpx_downstream_connection.cc
View file @
e871768d
...
@@ -82,7 +82,7 @@ int DownstreamConnection::attach_downstream(Downstream *downstream)
...
@@ -82,7 +82,7 @@ int DownstreamConnection::attach_downstream(Downstream *downstream)
downstream
->
set_downstream_connection
(
this
);
downstream
->
set_downstream_connection
(
this
);
downstream_
=
downstream
;
downstream_
=
downstream
;
bufferevent_setwatermark
(
bev_
,
EV_READ
,
0
,
SHRPX_READ_WARTER_MARK
);
bufferevent_setwatermark
(
bev_
,
EV_READ
,
0
,
SHRPX_READ_WARTER_MARK
);
bufferevent_
enable
(
bev_
,
EV_READ
|
EV_WRITE
);
bufferevent_
disable
(
bev_
,
EV_READ
);
bufferevent_setcb
(
bev_
,
bufferevent_setcb
(
bev_
,
upstream
->
get_downstream_readcb
(),
upstream
->
get_downstream_readcb
(),
upstream
->
get_downstream_writecb
(),
upstream
->
get_downstream_writecb
(),
...
@@ -134,7 +134,7 @@ void DownstreamConnection::detach_downstream(Downstream *downstream)
...
@@ -134,7 +134,7 @@ void DownstreamConnection::detach_downstream(Downstream *downstream)
}
}
downstream
->
set_downstream_connection
(
0
);
downstream
->
set_downstream_connection
(
0
);
downstream_
=
0
;
downstream_
=
0
;
bufferevent_
enable
(
bev_
,
EV_READ
|
EV_WRITE
);
bufferevent_
disable
(
bev_
,
EV_READ
);
bufferevent_setcb
(
bev_
,
0
,
0
,
idle_eventcb
,
this
);
bufferevent_setcb
(
bev_
,
0
,
0
,
idle_eventcb
,
this
);
client_handler_
->
pool_downstream_connection
(
this
);
client_handler_
->
pool_downstream_connection
(
this
);
}
}
...
...
examples/shrpx_https_upstream.cc
View file @
e871768d
...
@@ -254,6 +254,7 @@ int HttpsUpstream::on_read()
...
@@ -254,6 +254,7 @@ int HttpsUpstream::on_read()
delete
downstream
;
delete
downstream
;
}
else
{
}
else
{
pause_read
(
SHRPX_MSG_BLOCK
);
pause_read
(
SHRPX_MSG_BLOCK
);
downstream
->
force_resume_read
();
}
}
}
}
}
else
if
(
htperr
==
htparse_error_none
)
{
}
else
if
(
htperr
==
htparse_error_none
)
{
...
...
examples/shrpx_spdy_upstream.cc
View file @
e871768d
...
@@ -180,6 +180,7 @@ void on_ctrl_recv_callback
...
@@ -180,6 +180,7 @@ void on_ctrl_recv_callback
<<
downstream
;
<<
downstream
;
}
}
downstream
->
set_request_state
(
Downstream
::
MSG_COMPLETE
);
downstream
->
set_request_state
(
Downstream
::
MSG_COMPLETE
);
downstream
->
force_resume_read
();
}
}
break
;
break
;
}
}
...
@@ -220,6 +221,7 @@ void on_data_chunk_recv_callback(spdylay_session *session,
...
@@ -220,6 +221,7 @@ void on_data_chunk_recv_callback(spdylay_session *session,
<<
downstream
;
<<
downstream
;
}
}
downstream
->
set_request_state
(
Downstream
::
MSG_COMPLETE
);
downstream
->
set_request_state
(
Downstream
::
MSG_COMPLETE
);
downstream
->
force_resume_read
();
}
}
}
}
}
}
...
...
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