diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_mysql.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/extra/m_mysql.cpp b/src/modules/extra/m_mysql.cpp index 83bccb1dc..6825f45c1 100644 --- a/src/modules/extra/m_mysql.cpp +++ b/src/modules/extra/m_mysql.cpp @@ -783,8 +783,12 @@ class ModuleSQL : public Module { throw ModuleException("m_mysql: Failed to create dispatcher thread: " + std::string(strerror(errno))); } - Srv->PublishFeature("SQL", this); - Srv->PublishFeature("MySQL", this); + if (!Srv->PublishFeature("SQL", this)) + { + /* Tell worker thread to exit NOW */ + giveup = true; + throw ModuleException("m_mysql: Unable to publish feature 'SQL'"); + } } virtual ~ModuleSQL() |