In s_client, when using quic, if we have data from the user to write then we shouldn't
hang in "select" waiting for something to happen.
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22480)
} while (!write_ssl
&& cbuf_len == 0
&& user_data_has_data(&user_data));
- if (cbuf_len > 0)
+ if (cbuf_len > 0) {
read_tty = 0;
- else
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 0;
+ } else {
read_tty = 1;
+ }
}
ssl_pending = read_ssl && SSL_has_pending(con);
ret = 0;
goto shut;
}
+
if (i > 0 && !user_data_add(&user_data, i)) {
ret = 0;
goto shut;