dlna: add SSDP AnnounceInterval flag option

The current default AnnounceInterval is too short, causing the
multicast domain to be flooded with NOTIFY announcements,
which may prevent other dlna devices from sleeping.

This change allows users to set the announcement interval,
and it's default value also increased to 12 minutes.

Even within the interval, rclone can still passively respond to
M-SEARCH requests from other devices.
This commit is contained in:
YanceyChiew
2022-10-06 16:59:51 +01:00
committed by Nick Craig-Wood
parent 4a35aff33c
commit 13b65104eb
3 changed files with 19 additions and 9 deletions
+1 -1
View File
@@ -118,7 +118,7 @@ func newServer(f fs.Fs, opt *dlnaflags.Options) (*server, error) {
}
s := &server{
AnnounceInterval: 10 * time.Second,
AnnounceInterval: opt.AnnounceInterval,
FriendlyName: friendlyName,
RootDeviceUUID: makeDeviceUUID(friendlyName),
Interfaces: interfaces,