summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/servers.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/servers.c b/src/core/servers.c
index b1da9b7e..0abfdfb0 100644
--- a/src/core/servers.c
+++ b/src/core/servers.c
@@ -524,7 +524,12 @@ int server_unref(SERVER_REC *server)
return TRUE;
}
- signal_emit("server destroyed", 1, server);
+ /* since module initialisation uses server connected, only let
+ them know that the object got destroyed if the server was
+ disconnected */
+ if (server->disconnected)
+ signal_emit("server destroyed", 1, server);
+
MODULE_DATA_DEINIT(server);
server_connect_unref(server->connrec);
if (server->rawlog != NULL) rawlog_destroy(server->rawlog);