Lines 188-194
Link Here
|
188 |
/* Run the query */ |
188 |
/* Run the query */ |
189 |
if (mysql_query (&connections[th_num].mysql, query)) |
189 |
if (mysql_query (&connections[th_num].mysql, query)) |
190 |
{ |
190 |
{ |
191 |
nsvs_log (LOG_ALERT, "%s (%d): mysql_query: %s", __FUNCTION__, th_num, |
191 |
/* Reconnect did not happen/work, run the query again. */ |
|
|
192 |
if (mysql_errno (&connections[th_num].mysql) == 2013) { |
193 |
nsvs_log (LOG_ALERT, "%s (%d): mysql_query: %s, retrying...", __FUNCTION__, th_num, |
194 |
mysql_error (&connections[th_num].mysql)); |
195 |
return run_query(type, key, th_num); |
196 |
} |
197 |
nsvs_log (LOG_ALERT, "%s (%d): mysql_query: %s, failed...", __FUNCTION__, th_num, |
192 |
mysql_error (&connections[th_num].mysql)); |
198 |
mysql_error (&connections[th_num].mysql)); |
193 |
return 0; |
199 |
return 0; |
194 |
} |
200 |
} |