Skip to content

Commit

Permalink
nginx: add timeout configurations for rtmp
Browse files Browse the repository at this point in the history
i hope this will fix the "stuck" streams when the client disconnects due to a network
error and it can't reconnect for several minutes as the server still considers the
stream as active
  • Loading branch information
z-bsod authored and Hive committed Mar 25, 2022
1 parent 4a6cc0d commit bbfa353
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/nginx-rtmp/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ http {

rtmp {
access_log /dev/stdout;

# this should fix the hangs when the stream dies
drop_idle_publisher 15s;
timeout 15s;
server {
listen 1935;
chunk_size 4096;
Expand Down

0 comments on commit bbfa353

Please sign in to comment.