Skip to content

Commit 53f4f57

Browse files
committed
Fix calling wait_io_or_timeout() (pass is_read properly for writes)
1 parent e396089 commit 53f4f57

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

libmariadb/secure/gnutls.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ ssize_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
12971297
{
12981298
if (rc != GNUTLS_E_AGAIN && rc != GNUTLS_E_INTERRUPTED)
12991299
return rc;
1300-
if (pvio->methods->wait_io_or_timeout(pvio, TRUE, pvio->mysql->options.write_timeout) < 1)
1300+
if (pvio->methods->wait_io_or_timeout(pvio, FALSE, pvio->mysql->options.write_timeout) < 1)
13011301
return rc;
13021302
}
13031303
return rc;

libmariadb/secure/openssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ my_bool ma_tls_connect(MARIADB_TLS *ctls)
632632
try_connect= 0;
633633
break;
634634
case SSL_ERROR_WANT_WRITE:
635-
if (pvio->methods->wait_io_or_timeout(pvio, TRUE, mysql->options.connect_timeout) < 1)
635+
if (pvio->methods->wait_io_or_timeout(pvio, FALSE, mysql->options.connect_timeout) < 1)
636636
try_connect= 0;
637637
break;
638638
default:
@@ -747,7 +747,7 @@ ssize_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length)
747747
int error= SSL_get_error((SSL *)ctls->ssl, rc);
748748
if (error != SSL_ERROR_WANT_WRITE)
749749
return rc;
750-
if (pvio->methods->wait_io_or_timeout(pvio, TRUE, pvio->mysql->options.write_timeout) < 1)
750+
if (pvio->methods->wait_io_or_timeout(pvio, FALSE, pvio->mysql->options.write_timeout) < 1)
751751
return rc;
752752
}
753753
return rc;

0 commit comments

Comments
 (0)