Fixed a memory leak in all the monitors when a failed mysql_ping to the database caused a reinitialization of MYSQL* connection.
This commit is contained in:
@ -360,7 +360,8 @@ char *server_string;
|
||||
char *dpwd = decryptPassword(passwd);
|
||||
int rc;
|
||||
int read_timeout = 1;
|
||||
|
||||
if(database->con)
|
||||
mysql_close(database->con);
|
||||
database->con = mysql_init(NULL);
|
||||
|
||||
rc = mysql_options(database->con, MYSQL_OPT_READ_TIMEOUT, (void *)&read_timeout);
|
||||
|
||||
Reference in New Issue
Block a user