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:
Martin Willi
2013-02-28 16:46:07 +01:00
parent bc07fef09c
commit 55854ecc25
+4 -1
View File
@@ -276,8 +276,11 @@ METHOD(pt_tls_client_t, destroy, void,
{
if (this->tls)
{
close(this->tls->get_fd(this->tls));
int fd;
fd = this->tls->get_fd(this->tls);
this->tls->destroy(this->tls);
close(fd);
}
this->address->destroy(this->address);
this->id->destroy(this->id);