extern int actconn; /* # of active sessions */
extern int listeners;
extern int jobs; /* # of active jobs (listeners, sessions, open devices) */
+extern int unstoppable_jobs; /* # of active jobs that can't be stopped during a soft stop */
extern int active_peers; /* # of active peers (connection attempts and successes) */
extern int connected_peers; /* # of really connected peers */
extern THREAD_LOCAL struct buffer trash;
int stopping; /* non zero means stopping in progress */
int killed; /* non zero means a hard-stop is triggered */
int jobs = 0; /* number of active jobs (conns, listeners, active tasks, ...) */
+int unstoppable_jobs = 0; /* number of active jobs that can't be stopped during a soft stop */
int active_peers = 0; /* number of active peers (connection attempts and connected) */
int connected_peers = 0; /* number of connected peers (verified ones) */
next = wake_expired_tasks();
/* stop when there's nothing left to do */
- if (jobs == 0)
+ if ((jobs - unstoppable_jobs) == 0)
break;
/* expire immediately if events are pending */
[INF_DESCRIPTION] = "description",
[INF_STOPPING] = "Stopping",
[INF_JOBS] = "Jobs",
+ [INF_UNSTOPPABLE_JOBS] = "Unstoppable Jobs",
[INF_LISTENERS] = "Listeners",
[INF_ACTIVE_PEERS] = "ActivePeers",
[INF_CONNECTED_PEERS] = "ConnectedPeers",
info[INF_DESCRIPTION] = mkf_str(FO_CONFIG|FN_OUTPUT|FS_SERVICE, global.desc);
info[INF_STOPPING] = mkf_u32(0, stopping);
info[INF_JOBS] = mkf_u32(0, jobs);
+ info[INF_UNSTOPPABLE_JOBS] = mkf_u32(0, unstoppable_jobs);
info[INF_LISTENERS] = mkf_u32(0, listeners);
info[INF_ACTIVE_PEERS] = mkf_u32(0, active_peers);
info[INF_CONNECTED_PEERS] = mkf_u32(0, connected_peers);