- yaz_log(YLOG_LOG, "Destroying session %u", s->session_id);
- iochan_destroy(s->timeout_iochan);
- destroy_session(s->psession);
- nmem_destroy(s->nmem);
+ if (must_destroy)
+ { /* destroying for real */
+ yaz_log(YLOG_LOG, "%p HTTP session destroying. session id %u", s, s->session_id); iochan_destroy(s->timeout_iochan);
+ destroy_session(s->psession);
+ nmem_destroy(s->nmem);
+ }
+ else {
+ yaz_log(YLOG_DEBUG, "%p HTTP Session. Active clients on session %u. Waiting for new timeout.", s, s->session_id);
+ }
+