mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-09-07 06:06:08 +00:00
unsubscribe/resubscribe on suspend/resume
This commit is contained in:
@@ -28,6 +28,15 @@ void suspend_resume_them_all(int signum) {
|
||||
uwsgi.workers[0].suspended = 1;
|
||||
}
|
||||
|
||||
// subscribe/unsubscribe if needed
|
||||
struct uwsgi_string_list *subscriptions = uwsgi.subscriptions;
|
||||
while(subscriptions) {
|
||||
uwsgi_log("%s %s\n", suspend ? "unsubscribing from" : "subscribing to", subscriptions->value);
|
||||
uwsgi_subscribe(subscriptions->value, suspend);
|
||||
subscriptions = subscriptions->next;
|
||||
}
|
||||
|
||||
|
||||
for (i = 1; i <= uwsgi.numproc; i++) {
|
||||
uwsgi.workers[i].suspended = suspend;
|
||||
if (uwsgi.workers[i].pid > 0) {
|
||||
|
||||
Reference in New Issue
Block a user