Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
subscription: fix the oneshot override subscription cleanup
  • Loading branch information
perexg committed May 31, 2015
1 parent f27ac40 commit 81c356c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/subscriptions.c
Expand Up @@ -142,6 +142,9 @@ subscription_unlink_service0(th_subscription_t *s, int reason, int stop)

LIST_REMOVE(s, ths_service_link);
s->ths_service = NULL;

if (stop && (s->ths_flags & SUBSCRIPTION_ONESHOT) != 0)
subscription_unsubscribe(s, 0);
}

void
Expand Down Expand Up @@ -584,6 +587,7 @@ subscription_unsubscribe(th_subscription_t *s, int quiet)
tvhlog(quiet ? LOG_TRACE : LOG_INFO, "subscription", "%04X: %s", shortid(s), buf);

if (t) {
s->ths_flags &= ~SUBSCRIPTION_ONESHOT;
service_remove_subscriber(t, s, SM_CODE_OK);
}

Expand Down

0 comments on commit 81c356c

Please sign in to comment.