From: Jaroslav Kysela Date: Mon, 7 Aug 2017 12:21:22 +0000 (+0200) Subject: satip server: try to shutdown the socket before RTP thread is called on RTSP timeout... X-Git-Tag: v4.2.4~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1793e28060963b272d6ba3e7ca0eb921c0c38390;p=thirdparty%2Ftvheadend.git satip server: try to shutdown the socket before RTP thread is called on RTSP timeout, fixes #4226 --- diff --git a/src/satip/rtsp.c b/src/satip/rtsp.c index 036112c37..e40a39582 100644 --- a/src/satip/rtsp.c +++ b/src/satip/rtsp.c @@ -228,6 +228,8 @@ rtsp_session_timer_cb(void *aux) tvhwarn(LS_SATIPS, "-/%s/%i: session closed (timeout)", rs->session, rs->stream); pthread_mutex_unlock(&global_lock); pthread_mutex_lock(&rtsp_lock); + if (rs->rtp_peer_port == RTSP_TCP_DATA && rs->tcp_data) + shutdown(rs->tcp_data->hc_fd, SHUT_RDWR); rtsp_close_session(rs); rtsp_free_session(rs); pthread_mutex_unlock(&rtsp_lock);