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
78523c67
Commit
78523c67
authored
Feb 22, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shrpx: Fix backend SPDY connection does not go through proxy
parent
bae80e56
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
src/shrpx_spdy_session.cc
src/shrpx_spdy_session.cc
+11
-3
src/shrpx_spdy_session.h
src/shrpx_spdy_session.h
+1
-1
No files found.
src/shrpx_spdy_session.cc
View file @
78523c67
...
...
@@ -78,6 +78,12 @@ int SpdySession::disconnect()
SSL_shutdown
(
ssl_
);
}
if
(
bev_
)
{
int
fd
=
bufferevent_getfd
(
bev_
);
if
(
fd
!=
-
1
&&
fd_
==
-
1
)
{
fd_
=
fd
;
}
else
if
(
fd
!=
-
1
&&
fd_
!=
-
1
)
{
assert
(
fd
==
fd_
);
}
bufferevent_disable
(
bev_
,
EV_READ
|
EV_WRITE
);
bufferevent_free
(
bev_
);
bev_
=
0
;
...
...
@@ -273,8 +279,8 @@ void proxy_readcb(bufferevent *bev, void *ptr)
switch
(
spdy
->
get_state
())
{
case
SpdySession
:
:
PROXY_CONNECTED
:
// The current bufferevent is no longer necessary, so delete it
// here.
spdy
->
free_bev
();
// here.
But we keep fd_ inside it.
spdy
->
unwrap_
free_bev
();
// Initiate SSL/TLS handshake through established tunnel.
spdy
->
initiate_connection
();
break
;
...
...
@@ -420,8 +426,10 @@ int SpdySession::initiate_connection()
return
0
;
}
void
SpdySession
::
free_bev
()
void
SpdySession
::
unwrap_
free_bev
()
{
assert
(
fd_
==
-
1
);
fd_
=
bufferevent_getfd
(
bev_
);
bufferevent_free
(
bev_
);
bev_
=
0
;
}
...
...
src/shrpx_spdy_session.h
View file @
78523c67
...
...
@@ -90,7 +90,7 @@ public:
void
notify
();
bufferevent
*
get_bev
()
const
;
void
free_bev
();
void
unwrap_
free_bev
();
int
get_state
()
const
;
void
set_state
(
int
state
);
...
...
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