Commit 42b24d18 authored by Philipp Schafft's avatar Philipp Schafft 🦁

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.
parent 0fe5d5fa
Pipeline #151 passed with stage
in 46 seconds
......@@ -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);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment