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
d837887a
Commit
d837887a
authored
Jun 04, 2016
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttpx: Avoid copy
parent
2a504224
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
src/shrpx_api_downstream_connection.cc
src/shrpx_api_downstream_connection.cc
+1
-1
src/shrpx_downstream.cc
src/shrpx_downstream.cc
+4
-4
src/shrpx_http2_upstream.cc
src/shrpx_http2_upstream.cc
+3
-3
src/shrpx_spdy_upstream.cc
src/shrpx_spdy_upstream.cc
+3
-3
No files found.
src/shrpx_api_downstream_connection.cc
View file @
d837887a
...
...
@@ -131,7 +131,7 @@ int APIDownstreamConnection::end_upload_data() {
config
.
conn
.
downstream
=
std
::
make_shared
<
DownstreamConfig
>
();
const
auto
&
downstreamconf
=
config
.
conn
.
downstream
;
auto
src
=
get_config
()
->
conn
.
downstream
;
auto
&
src
=
get_config
()
->
conn
.
downstream
;
downstreamconf
->
timeout
=
src
->
timeout
;
downstreamconf
->
connections_per_host
=
src
->
connections_per_host
;
...
...
src/shrpx_downstream.cc
View file @
d837887a
...
...
@@ -510,8 +510,8 @@ bool Downstream::request_buf_full() {
}
if
(
dconn_
)
{
auto
downstreamconf
=
worker
->
get_downstream_config
();
return
request_buf_
.
rleft
()
>=
downstreamconf
->
request_buffer_size
;
auto
&
downstreamconf
=
*
worker
->
get_downstream_config
();
return
request_buf_
.
rleft
()
>=
downstreamconf
.
request_buffer_size
;
}
return
false
;
...
...
@@ -604,9 +604,9 @@ bool Downstream::response_buf_full() {
if
(
dconn_
)
{
auto
handler
=
upstream_
->
get_client_handler
();
auto
worker
=
handler
->
get_worker
();
auto
downstreamconf
=
worker
->
get_downstream_config
();
auto
&
downstreamconf
=
*
worker
->
get_downstream_config
();
return
response_buf_
.
rleft
()
>=
downstreamconf
->
response_buffer_size
;
return
response_buf_
.
rleft
()
>=
downstreamconf
.
response_buffer_size
;
}
return
false
;
...
...
src/shrpx_http2_upstream.cc
View file @
d837887a
...
...
@@ -857,13 +857,13 @@ nghttp2_session_callbacks *create_http2_upstream_callbacks() {
namespace
{
size_t
downstream_queue_size
(
Worker
*
worker
)
{
auto
downstreamconf
=
worker
->
get_downstream_config
();
auto
&
downstreamconf
=
*
worker
->
get_downstream_config
();
if
(
get_config
()
->
http2_proxy
)
{
return
downstreamconf
->
connections_per_host
;
return
downstreamconf
.
connections_per_host
;
}
return
downstreamconf
->
connections_per_frontend
;
return
downstreamconf
.
connections_per_frontend
;
}
}
// namespace
...
...
src/shrpx_spdy_upstream.cc
View file @
d837887a
...
...
@@ -514,13 +514,13 @@ uint32_t infer_upstream_rst_stream_status_code(uint32_t downstream_error_code) {
namespace
{
size_t
downstream_queue_size
(
Worker
*
worker
)
{
auto
downstreamconf
=
worker
->
get_downstream_config
();
auto
&
downstreamconf
=
*
worker
->
get_downstream_config
();
if
(
get_config
()
->
http2_proxy
)
{
return
downstreamconf
->
connections_per_host
;
return
downstreamconf
.
connections_per_host
;
}
return
downstreamconf
->
connections_per_frontend
;
return
downstreamconf
.
connections_per_frontend
;
}
}
// namespace
...
...
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