aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/extra/m_mysql.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2024-05-20 12:14:58 +0100
committerGravatar Sadie Powell2024-05-20 12:14:58 +0100
commit09cb9c3381099e478478d6fdae8fb57520469675 (patch)
tree6732f6759a5a2c0087450a6be0cd2c2d64d64e4c /src/modules/extra/m_mysql.cpp
parentResend the customversion when it changes. (diff)
parentFix building on macOS. (diff)
Merge branch 'insp3' into master.
Diffstat (limited to 'src/modules/extra/m_mysql.cpp')
-rw-r--r--src/modules/extra/m_mysql.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp
index a8c13a4fd..846446df8 100644
--- a/src/modules/extra/m_mysql.cpp
+++ b/src/modules/extra/m_mysql.cpp
@@ -317,6 +317,12 @@ public:
// true upon success.
bool Connect()
{
+ if (connection)
+ {
+ mysql_close(connection);
+ connection = NULL;
+ }
+
connection = mysql_init(connection);
// Set the connection timeout.