From 56e74d495ce25d15a769c2c271bf2cad45d7a587 Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 22 Jul 2006 11:25:49 +0000 Subject: Stop publishing MySQL feature - check for successful publishing of SQL feature git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4504 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/extra/m_mysql.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/modules/extra') 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() -- cgit v1.2.3