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:
@ -401,7 +401,8 @@ char *server_string;
|
||||
int connect_timeout = handle->connect_timeout;
|
||||
int read_timeout = handle->read_timeout;
|
||||
int write_timeout = handle->write_timeout;
|
||||
|
||||
if(database->con)
|
||||
mysql_close(database->con);
|
||||
database->con = mysql_init(NULL);
|
||||
|
||||
rc = mysql_options(database->con, MYSQL_OPT_CONNECT_TIMEOUT, (void *)&connect_timeout);
|
||||
|
Reference in New Issue
Block a user