Skip to content

Commit 18fc952

Browse files
Wait for ssl handshake to finish before writing to socket
Found by: michaelortmann Patch by: michaelortmann
1 parent 8835a0e commit 18fc952

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/net.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,11 @@ void dequeue_sockets()
14021402
tv.tv_usec = 0; /* we only want to see if it's ready for writing, no need to actually wait.. */
14031403
for (i = 0; i < td->MAXSOCKS; i++)
14041404
if (!(socklist[i].flags & (SOCK_UNUSED | SOCK_TCL)) &&
1405-
(socklist[i].handler.sock.outbuf != NULL)) {
1405+
(socklist[i].handler.sock.outbuf != NULL)
1406+
#ifdef TLS
1407+
&& !(socklist[i].ssl && !SSL_is_init_finished(socklist[i].ssl))
1408+
#endif
1409+
) {
14061410
if (socklist[i].sock > maxfd)
14071411
maxfd = socklist[i].sock;
14081412
FD_SET(socklist[i].sock, &wfds);

0 commit comments

Comments
 (0)