From d322f854c05ff6ae1a66e3c80880025ce4bccbfa Mon Sep 17 00:00:00 2001
From: Chocobozzz <me@florianbigard.com>
Date: Wed, 4 May 2022 16:12:49 +0200
Subject: [PATCH] Prefer using null for rtmp listen setting

---
 config/default.yaml            | 10 ++++++----
 config/production.yaml.example | 10 ++++++----
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/config/default.yaml b/config/default.yaml
index 79afb121b..a27ffba02 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -413,8 +413,9 @@ live:
     enabled: true
 
     # Listening hostname/port for RTMP server
-    # :: to listen on IPv6 and IPv4, 0.0.0.0 to listen on IPv4
-    hostname: '::'
+    # '::' to listen on IPv6 and IPv4, '0.0.0.0' to listen on IPv4
+    # Use null to automatically listen on '::' if IPv6 is available, or '0.0.0.0' otherwise
+    hostname: null
     port: 1935
 
     # Public hostname of your RTMP server
@@ -425,8 +426,9 @@ live:
     enabled: false
 
     # Listening hostname/port for RTMPS server
-    # :: to listen on IPv6 and IPv4, 0.0.0.0 to listen on IPv4
-    hostname: '::'
+    # '::' to listen on IPv6 and IPv4, '0.0.0.0' to listen on IPv4
+    # Use null to automatically listen on '::' if IPv6 is available, or '0.0.0.0' otherwise
+    hostname: null
     port: 1936
 
     # Absolute paths
diff --git a/config/production.yaml.example b/config/production.yaml.example
index 11120e667..754b1b8a8 100644
--- a/config/production.yaml.example
+++ b/config/production.yaml.example
@@ -421,8 +421,9 @@ live:
     enabled: true
 
     # Listening hostname/port for RTMP server
-    # :: to listen on IPv6 and IPv4, 0.0.0.0 to listen on IPv4
-    hostname: '::'
+    # '::' to listen on IPv6 and IPv4, '0.0.0.0' to listen on IPv4
+    # Use null to automatically listen on '::' if IPv6 is available, or '0.0.0.0' otherwise
+    hostname: null
     port: 1935
 
     # Public hostname of your RTMP server
@@ -433,8 +434,9 @@ live:
     enabled: false
 
     # Listening hostname/port for RTMPS server
-    # :: to listen on IPv6 and IPv4, 0.0.0.0 to listen on IPv4
-    hostname: '::'
+    # '::' to listen on IPv6 and IPv4, '0.0.0.0' to listen on IPv4
+    # Use null to automatically listen on '::' if IPv6 is available, or '0.0.0.0' otherwise
+    hostname: null
     port: 1936
 
     # Absolute paths