]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Don't send STOP if we have not sent a START message
authorAndreas Öman <andreas@lonelycoder.com>
Tue, 26 Jan 2010 21:06:48 +0000 (21:06 +0000)
committerAndreas Öman <andreas@lonelycoder.com>
Tue, 26 Jan 2010 21:06:48 +0000 (21:06 +0000)
src/subscriptions.c

index cd326e1f470ae0dd69360c5a46720f9d74dcc769..14a5fb7f9ce9a9f899af4462eb90cfd539997a5d 100644 (file)
@@ -114,7 +114,8 @@ subscription_unlink_transport(th_subscription_t *s)
   // Unlink from transport output
   streaming_target_disconnect(&t->tht_streaming_pad, &s->ths_input);
 
-  if(LIST_FIRST(&t->tht_components) != NULL) {
+  if(LIST_FIRST(&t->tht_components) != NULL && 
+     s->ths_state == SUBSCRIPTION_GOT_TRANSPORT) {
     // Send a STOP message to the subscription client
     sm = streaming_msg_create_code(SMT_STOP, 0);
     streaming_target_deliver(s->ths_output, sm);