# Streaming: "stop" asyn. request - recevied an ack and there is no response in a session stopping state

**URL:** <https://janus.discourse.group/t/streaming-stop-asyn-request-recevied-an-ack-and-there-is-no-response-in-a-session-stopping-state/1484>\
**Category:** General\
**Created:** [February 19, 2025, 4:27am UTC](https://janus.discourse.group/t/streaming-stop-asyn-request-recevied-an-ack-and-there-is-no-response-in-a-session-stopping-state/1484 "2025-02-19T04:27:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaejong](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jaejong](https://janus.discourse.group/u/Jaejong)\
**Post date:** [February 19, 2025, 4:27am UTC](https://janus.discourse.group/t/streaming-stop-asyn-request-recevied-an-ack-and-there-is-no-response-in-a-session-stopping-state/1484/1 "2025-02-19T04:27:11Z")

</div>

Is there a reason for ignoring and not sending an error response?  
“unpublish” async. request in the videoroom receives an error response.

```auto
janus_streaming.c 
	else if(!strcasecmp(request_text, "stop")) {
		janus_mutex_unlock(&sessions_mutex);
		if(g_atomic_int_get(&session->stopping) || !g_atomic_int_get(&session->started)) {
			/* Been there, done that: ignore */
			janus_streaming_message_free(msg);
			continue;
		}
		JANUS_LOG(LOG_VERB, "Stopping the streaming\n");
		...
	}

```

```auto
janus_videoroom.c
	else if(!strcasecmp(request_text, "unpublish")) {
		/* This participant wants to unpublish */
		if(!g_atomic_int_get(&participant->session->started)) {
			janus_refcount_decrease(&participant->ref);
			JANUS_LOG(LOG_ERR, "Can't unpublish, not published\n");
			error_code = JANUS_VIDEOROOM_ERROR_NOT_PUBLISHED;
			g_snprintf(error_cause, 512, "Can't unpublish, not published");
			goto error;
		}
		/* Tell the core to tear down the PeerConnection, hangup_media will do the rest */
		...
	}

```

---

<div class="post-metadata">

**Author:** ![lorenzo](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/lorenzo/32/425_2.png) [@lorenzo](https://janus.discourse.group/u/lorenzo)\
**Post date:** [February 19, 2025, 8:44am UTC](https://janus.discourse.group/t/streaming-stop-asyn-request-recevied-an-ack-and-there-is-no-response-in-a-session-stopping-state/1484/2 "2025-02-19T08:44:44Z")

</div>

I guess we could send an event back for consistency, yes, especially if the client stack does always expect something after an ACK.

---

<div class="post-metadata">

**Author:** ![lorenzo](https://yyz2.discourse-cdn.com/free1/user_avatar/janus.discourse.group/lorenzo/32/425_2.png) [@lorenzo](https://janus.discourse.group/u/lorenzo)\
**Post date:** [February 19, 2025, 2:02pm UTC](https://janus.discourse.group/t/streaming-stop-asyn-request-recevied-an-ack-and-there-is-no-response-in-a-session-stopping-state/1484/3 "2025-02-19T14:02:53Z")

</div>

Done in this commit: [Send an 'idle' response when stopping a not-started mountpoint · meetecho/janus-gateway@5fa7376 · GitHub](https://github.com/meetecho/janus-gateway/commit/5fa73769753909efb90abf1dba90c0bdf060949e)

---

<div class="post-metadata">

**Author:** ![Jaejong](https://avatars.discourse-cdn.com/v4/letter/j/e47774/32.png) [@Jaejong](https://janus.discourse.group/u/Jaejong)\
**Post date:** [February 19, 2025, 2:17pm UTC](https://janus.discourse.group/t/streaming-stop-asyn-request-recevied-an-ack-and-there-is-no-response-in-a-session-stopping-state/1484/4 "2025-02-19T14:17:52Z")

</div>

Lorenzo, Thanks for replying.  
I love Janus, so I named my character Janus in Diablo 4 Season 7. ^^

I will always be a supporter of Janus.
