From 614d79121a728d25c7fd45ca93fa21a63e1c1afd Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Fri, 16 Dec 2022 14:32:39 +0000 Subject: [PATCH] serve dlna: fix panic: Logger uninitialized. Before this change we forgot to initialize the logger for the dlna server. This meant when it needed to log something, it paniced instead. See: https://forum.rclone.org/t/rclone-serve-dlna-after-few-hours-of-idle-running-panic-logger-uninitialized-names/34835 --- cmd/serve/dlna/dlna.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cmd/serve/dlna/dlna.go b/cmd/serve/dlna/dlna.go index 2389ce638..19db02f16 100644 --- a/cmd/serve/dlna/dlna.go +++ b/cmd/serve/dlna/dlna.go @@ -17,6 +17,7 @@ import ( "github.com/anacrolix/dms/soap" "github.com/anacrolix/dms/ssdp" "github.com/anacrolix/dms/upnp" + "github.com/anacrolix/log" "github.com/rclone/rclone/cmd" "github.com/rclone/rclone/cmd/serve/dlna/data" "github.com/rclone/rclone/cmd/serve/dlna/dlnaflags" @@ -404,6 +405,7 @@ func (s *server) ssdpInterface(intf net.Interface) { Server: serverField, UUID: s.RootDeviceUUID, NotifyInterval: s.AnnounceInterval, + Logger: log.Default, } // An interface with these flags should be valid for SSDP.