aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-13 02:45:39 +0200
committerMattias Andrée <maandree@kth.se>2016-07-13 02:45:39 +0200
commit7873b05c4bfa776ae90145a7689591c66b0913d6 (patch)
tree09207acea7a1e9a627e1415c7f6c1b4eecb7351d
parentApplying filters (diff)
downloadcoopgammad-7873b05c4bfa776ae90145a7689591c66b0913d6.tar.gz
coopgammad-7873b05c4bfa776ae90145a7689591c66b0913d6.tar.bz2
coopgammad-7873b05c4bfa776ae90145a7689591c66b0913d6.tar.xz
Only remove filter when a connection closes if the filter has until-death lifespan
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--src/server.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/server.c b/src/server.c
index 06d88da..4b1f939 100644
--- a/src/server.c
+++ b/src/server.c
@@ -301,6 +301,7 @@ static int connection_closed(int client)
for (j = k = 0; j < output->table_size; j += !remove, k++)
{
remove = output->table_filters[j].client == client;
+ remove = remove && (output->table_filters[j].lifespan == LIFESPAN_UNTIL_DEATH);
if (remove)
{
filter_destroy(output->table_filters + j);