request_delq(&h->outgoing);
xfree(h);
xmalloc_trav("session closed");
- if (cb && cb->one_shot)
- {
- exit(0);
- }
}
static void do_close_req(association *a, int reason, char *message,
}
}
+static void remove_listeners(void);
+
/*
* handle incoming connect requests.
* The dynamic mode is a bit tricky mostly because we want to avoid
return;
}
+ if (control_block.one_shot)
+ remove_listeners();
+
yaz_log(log_sessiondetail, "Connect from %s", cs_addrstr(new_line));
no_sessions++;
return 0; /* OK */
}
+static void remove_listeners(void)
+{
+ IOCHAN l = pListener;
+ for (; l; l = l->next)
+ iochan_destroy(l);
+}
+
#ifndef WIN32
/* UNIX only (for windows we don't need to catch the signals) */
static void catchchld(int num)