mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
Merge pull request #1789 from calmh/reduce-default-lease
Set default UPnP lease time to 60 minutes
This commit is contained in:
commit
e869e3c534
@ -228,7 +228,7 @@ type OptionsConfiguration struct {
|
|||||||
ReconnectIntervalS int `xml:"reconnectionIntervalS" json:"reconnectionIntervalS" default:"60"`
|
ReconnectIntervalS int `xml:"reconnectionIntervalS" json:"reconnectionIntervalS" default:"60"`
|
||||||
StartBrowser bool `xml:"startBrowser" json:"startBrowser" default:"true"`
|
StartBrowser bool `xml:"startBrowser" json:"startBrowser" default:"true"`
|
||||||
UPnPEnabled bool `xml:"upnpEnabled" json:"upnpEnabled" default:"true"`
|
UPnPEnabled bool `xml:"upnpEnabled" json:"upnpEnabled" default:"true"`
|
||||||
UPnPLeaseM int `xml:"upnpLeaseMinutes" json:"upnpLeaseMinutes" default:"0"`
|
UPnPLeaseM int `xml:"upnpLeaseMinutes" json:"upnpLeaseMinutes" default:"60"`
|
||||||
UPnPRenewalM int `xml:"upnpRenewalMinutes" json:"upnpRenewalMinutes" default:"30"`
|
UPnPRenewalM int `xml:"upnpRenewalMinutes" json:"upnpRenewalMinutes" default:"30"`
|
||||||
UPnPTimeoutS int `xml:"upnpTimeoutSeconds" json:"upnpTimeoutSeconds" default:"10"`
|
UPnPTimeoutS int `xml:"upnpTimeoutSeconds" json:"upnpTimeoutSeconds" default:"10"`
|
||||||
URAccepted int `xml:"urAccepted" json:"urAccepted"` // Accepted usage reporting version; 0 for off (undecided), -1 for off (permanently)
|
URAccepted int `xml:"urAccepted" json:"urAccepted"` // Accepted usage reporting version; 0 for off (undecided), -1 for off (permanently)
|
||||||
|
@ -42,7 +42,7 @@ func TestDefaultValues(t *testing.T) {
|
|||||||
ReconnectIntervalS: 60,
|
ReconnectIntervalS: 60,
|
||||||
StartBrowser: true,
|
StartBrowser: true,
|
||||||
UPnPEnabled: true,
|
UPnPEnabled: true,
|
||||||
UPnPLeaseM: 0,
|
UPnPLeaseM: 60,
|
||||||
UPnPRenewalM: 30,
|
UPnPRenewalM: 30,
|
||||||
UPnPTimeoutS: 10,
|
UPnPTimeoutS: 10,
|
||||||
RestartOnWakeup: true,
|
RestartOnWakeup: true,
|
||||||
@ -148,7 +148,7 @@ func TestOverriddenValues(t *testing.T) {
|
|||||||
ReconnectIntervalS: 6000,
|
ReconnectIntervalS: 6000,
|
||||||
StartBrowser: false,
|
StartBrowser: false,
|
||||||
UPnPEnabled: false,
|
UPnPEnabled: false,
|
||||||
UPnPLeaseM: 60,
|
UPnPLeaseM: 90,
|
||||||
UPnPRenewalM: 15,
|
UPnPRenewalM: 15,
|
||||||
UPnPTimeoutS: 15,
|
UPnPTimeoutS: 15,
|
||||||
RestartOnWakeup: false,
|
RestartOnWakeup: false,
|
||||||
|
2
internal/config/testdata/overridenvalues.xml
vendored
2
internal/config/testdata/overridenvalues.xml
vendored
@ -13,7 +13,7 @@
|
|||||||
<reconnectionIntervalS>6000</reconnectionIntervalS>
|
<reconnectionIntervalS>6000</reconnectionIntervalS>
|
||||||
<startBrowser>false</startBrowser>
|
<startBrowser>false</startBrowser>
|
||||||
<upnpEnabled>false</upnpEnabled>
|
<upnpEnabled>false</upnpEnabled>
|
||||||
<upnpLeaseMinutes>60</upnpLeaseMinutes>
|
<upnpLeaseMinutes>90</upnpLeaseMinutes>
|
||||||
<upnpRenewalMinutes>15</upnpRenewalMinutes>
|
<upnpRenewalMinutes>15</upnpRenewalMinutes>
|
||||||
<upnpTimeoutSeconds>15</upnpTimeoutSeconds>
|
<upnpTimeoutSeconds>15</upnpTimeoutSeconds>
|
||||||
<restartOnWakeup>false</restartOnWakeup>
|
<restartOnWakeup>false</restartOnWakeup>
|
||||||
|
Loading…
Reference in New Issue
Block a user