server session BUGFIX always reset last session on delete
diff --git a/src/session_server.c b/src/session_server.c
index 2b3902c..b142dd9 100644
--- a/src/session_server.c
+++ b/src/session_server.c
@@ -841,13 +841,11 @@
--ps->session_count;
if (i < ps->session_count) {
ps->sessions[i] = ps->sessions[ps->session_count];
- if (ps->last_event_session == i) {
- ps->last_event_session = 0;
- }
} else if (!ps->session_count) {
free(ps->sessions);
ps->sessions = NULL;
}
+ ps->last_event_session = 0;
return 0;
}
}