diff options
author | Sadie Powell <sadie@witchery.services> | 2020-04-23 16:12:42 +0100 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2020-04-23 16:14:42 +0100 |
commit | fbdd08043e97c2749ce2f03382559bba89abf47a (patch) | |
tree | 275392e7328c5b648beac04e4aca5489e0561677 /src/modules | |
parent | b24a91181f58c7f7141de8995ff212993bcc333b (diff) |
Unregister pgsql connection fds when they are deleted.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/extra/m_pgsql.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/extra/m_pgsql.cpp b/src/modules/extra/m_pgsql.cpp index 916f164d1..c64017d61 100644 --- a/src/modules/extra/m_pgsql.cpp +++ b/src/modules/extra/m_pgsql.cpp @@ -225,6 +225,7 @@ class SQLConn : public SQL::Provider, public EventHandler q->OnError(err); delete q; } + Close(); } void OnEventHandlerRead() CXX11_OVERRIDE @@ -506,7 +507,9 @@ restart: void Close() { status = DEAD; - SocketEngine::DelFd(this); + + if (HasFd() && SocketEngine::HasFd(GetFd())) + SocketEngine::DelFd(this); if(sql) { |