Remove explicit tls_handshake(3) from ircConnect

The first call to ircFormat, which calls tls_write(3) in turn, will
perform the handshake anyway. This way the handshake happens after
the final pledge(2) call.
master
C. McEnroe 2021-06-24 17:58:12 -04:00
parent a0cc519829
commit 981ebc4f12
1 changed files with 0 additions and 5 deletions

5
irc.c
View File

@ -162,11 +162,6 @@ int ircConnect(const char *bindHost, const char *host, const char *port) {
error = tls_connect_socket(client, sock, host);
if (error) errx(EX_PROTOCOL, "tls_connect: %s", tls_error(client));
do {
error = tls_handshake(client);
} while (error == TLS_WANT_POLLIN || error == TLS_WANT_POLLOUT);
if (error) errx(EX_PROTOCOL, "tls_handshake: %s", tls_error(client));
return sock;
}