Don't close underlying file descriptor before destroying a tls_socket
tls_socket cleanup usually sends a TLS close notify, for which it uses a valid socket.
This commit is contained in:
@@ -276,8 +276,11 @@ METHOD(pt_tls_client_t, destroy, void,
|
|||||||
{
|
{
|
||||||
if (this->tls)
|
if (this->tls)
|
||||||
{
|
{
|
||||||
close(this->tls->get_fd(this->tls));
|
int fd;
|
||||||
|
|
||||||
|
fd = this->tls->get_fd(this->tls);
|
||||||
this->tls->destroy(this->tls);
|
this->tls->destroy(this->tls);
|
||||||
|
close(fd);
|
||||||
}
|
}
|
||||||
this->address->destroy(this->address);
|
this->address->destroy(this->address);
|
||||||
this->id->destroy(this->id);
|
this->id->destroy(this->id);
|
||||||
|
|||||||
Reference in New Issue
Block a user