File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/AudioTools/Communication/RTSP Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -161,10 +161,10 @@ class RTSPServer {
161161 operator bool () { return client_count > 0 ;}
162162
163163 /* *
164- * @brief Set the session timeout in milliseconds
164+ * @brief Set the session timeout in milliseconds; 0 = no timeout
165165 * @param ms Timeout in milliseconds
166166 */
167- void setSessionTimoutMs (unsigned long ms){ sessionTimeoutMs = ms;}
167+ void setSessionTimeoutMs (unsigned long ms){ sessionTimeoutMs = ms;}
168168
169169 protected:
170170 int port; // port that the RTSP Server listens on
@@ -178,7 +178,7 @@ class RTSPServer {
178178 // source for data streams
179179 bool (*onSessionPathCb)(const char *, void *) = nullptr ; // session path callback
180180 void * onSessionPathRef = nullptr ;
181- unsigned long sessionTimeoutMs = 20000 ; // 20 seconds
181+ unsigned long sessionTimeoutMs = 60000 ; // 20 seconds
182182
183183 /* *
184184 * @brief Start RTSP server asynchronously
@@ -311,7 +311,7 @@ class RTSPServer {
311311 }
312312
313313 // If streaming, check for session timeout
314- if (rtsp ->isStreaming ()) {
314+ if (sessionTimeoutMs > 0 && m_sessionTrtsp ->isStreaming ()) {
315315 if ((millis () - lastRequestTime) > sessionTimeoutMs) {
316316 LOGW (" Session timeout: no client request received for 20 seconds, closing session" );
317317 break ;
You can’t perform that action at this time.
0 commit comments