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
53271e1e
Commit
53271e1e
authored
Dec 22, 2013
by
Tatsuhiro Tsujikawa
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nghttp: Close fd on disconnect
parent
c4539046
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
src/nghttp.cc
src/nghttp.cc
+6
-0
No files found.
src/nghttp.cc
View file @
53271e1e
...
@@ -547,10 +547,12 @@ struct HttpClient {
...
@@ -547,10 +547,12 @@ struct HttpClient {
void
disconnect
()
void
disconnect
()
{
{
int
fd
=
-
1
;
state
=
STATE_IDLE
;
state
=
STATE_IDLE
;
nghttp2_session_del
(
session
);
nghttp2_session_del
(
session
);
session
=
nullptr
;
session
=
nullptr
;
if
(
ssl
)
{
if
(
ssl
)
{
fd
=
SSL_get_fd
(
ssl
);
SSL_shutdown
(
ssl
);
SSL_shutdown
(
ssl
);
}
}
if
(
bev
)
{
if
(
bev
)
{
...
@@ -570,6 +572,10 @@ struct HttpClient {
...
@@ -570,6 +572,10 @@ struct HttpClient {
SSL_free
(
ssl
);
SSL_free
(
ssl
);
ssl
=
nullptr
;
ssl
=
nullptr
;
}
}
if
(
fd
!=
-
1
)
{
shutdown
(
fd
,
SHUT_WR
);
close
(
fd
);
}
}
}
int
on_upgrade_connect
()
int
on_upgrade_connect
()
...
...
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