summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_pgsql.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp
index 24c5aa499..5d07c23b5 100644
--- a/src/modules/extra/m_pgsql.cpp
+++ b/src/modules/extra/m_pgsql.cpp
@@ -735,7 +735,12 @@ bool SQLConn::DoConnect()
}
this->state = I_CONNECTING;
- ServerInstance->SE->AddFd(this->fd,false,X_ESTAB_MODULE);
+ if (!ServerInstance->SE->AddFd(this->fd,false,X_ESTAB_MODULE))
+ {
+ log(DEBUG, "A PQsocket cant be added to the socket engine!");
+ Close();
+ return false;
+ }
socket_ref[this->fd] = this;
/* Socket all hooked into the engine, now to tell PgSQL to start connecting */