Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
d81f1cc1
Commit
d81f1cc1
authored
Jul 10, 2018
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up SSL pending reads when closing a socket
parent
1a3bfec1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
SSLSocket.c
src/SSLSocket.c
+8
-2
No files found.
src/SSLSocket.c
View file @
d81f1cc1
...
...
@@ -814,12 +814,19 @@ void SSLSocket_destroyContext(networkHandles* net)
FUNC_EXIT
;
}
static
List
pending_reads
=
{
NULL
,
NULL
,
NULL
,
0
,
0
};
int
SSLSocket_close
(
networkHandles
*
net
)
{
int
rc
=
1
;
FUNC_ENTRY
;
if
(
net
->
ssl
)
{
/* clean up any pending reads for this socket */
if
(
pending_reads
.
count
>
0
&&
ListFindItem
(
&
pending_reads
,
&
net
->
socket
,
intcompare
))
ListRemoveItem
(
&
pending_reads
,
&
net
->
socket
,
intcompare
);
if
(
net
->
ssl
)
{
rc
=
SSL_shutdown
(
net
->
ssl
);
SSL_free
(
net
->
ssl
);
net
->
ssl
=
NULL
;
...
...
@@ -897,7 +904,6 @@ int SSLSocket_putdatas(SSL* ssl, int socket, char* buf0, size_t buf0len, int cou
return
rc
;
}
static
List
pending_reads
=
{
NULL
,
NULL
,
NULL
,
0
,
0
};
void
SSLSocket_addPendingRead
(
int
sock
)
{
...
...
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