when client auth is used, client input is the message that ends the TLS handshake
@@ -1076,7 +1076,7 @@ static void proceed_handshake_picotls(h2o_socket_t *sock)
write_ssl_bytes(sock, wbuf.base, wbuf.off);
flush_pending_ssl(sock, ret == 0 ? on_handshake_complete : proceed_handshake);
} else {
- h2o_socket_read_start(sock, proceed_handshake);
+ h2o_socket_read_start(sock, ret == PTLS_ERROR_IN_PROGRESS ? proceed_handshake : on_handshake_complete);
}
break;
default:
