We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f96cb44 commit 1693848Copy full SHA for 1693848
_mysql.c
@@ -1908,7 +1908,10 @@ _mysql_ConnectionObject_ping(
1908
int r, reconnect = -1;
1909
if (!PyArg_ParseTuple(args, "|I", &reconnect)) return NULL;
1910
check_connection(self);
1911
- if ( reconnect != -1 ) self->connection.reconnect = reconnect;
+ if (reconnect != -1) {
1912
+ my_bool recon = reconnect;
1913
+ mysql_options(&self->connection, MYSQL_OPT_RECONNECT, &recon);
1914
+ }
1915
Py_BEGIN_ALLOW_THREADS
1916
r = mysql_ping(&(self->connection));
1917
Py_END_ALLOW_THREADS
0 commit comments