1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

Fix: Shut down TLS before closing socket.

We should first shut down TLS so we can signal the other end a clean shutdown
in contrast to a socket failure.

Big thanks to wget(1) to find it. Fantastic tool.
This commit is contained in:
Philipp Schafft 2018-05-19 08:13:05 +00:00
parent 0fe5d5fa1f
commit 42b24d1840

View File

@ -1496,10 +1496,10 @@ void connection_close(connection_t *con)
if (!con)
return;
tls_unref(con->tls);
if (con->sock != -1) /* TODO: do not use magic */
sock_close(con->sock);
if (con->ip)
free(con->ip);
tls_unref(con->tls);
free(con);
}