raop: Disable is_recording flag when tearing down the connection

This patch is based on a similar idea as the previous one -- disabling
the flag right after the session is getting closed, rather than waiting
for a response from the server.
This commit is contained in:
Hajime Fujita 2016-11-06 12:54:23 -06:00 committed by Tanu Kaskinen
parent f3aa588a61
commit 3e26f2d15e

View file

@ -1120,8 +1120,6 @@ static void rtsp_stream_cb(pa_rtsp_client *rtsp, pa_rtsp_state_t state, pa_rtsp_
case STATE_TEARDOWN: {
pa_log_debug("RAOP: TEARDOWN");
c->is_recording = false;
if (c->tcp_sfd > 0)
pa_close(c->tcp_sfd);
c->tcp_sfd = -1;
@ -1631,6 +1629,8 @@ int pa_raop_client_teardown(pa_raop_client *c) {
return 1;
}
c->is_recording = false;
rv = pa_rtsp_teardown(c->rtsp);
return rv;
}