Always run relaying when enabled (fixes #2665)

This commit is contained in:
Jakob Borg 2016-01-12 14:15:47 +01:00
parent 1e45111bde
commit f741066466
3 changed files with 1 additions and 4 deletions

View File

@ -738,7 +738,7 @@ func syncthingMain(runtimeOptions RuntimeOptions) {
// Start relay management
var relayService *relay.Service
if opts.RelaysEnabled && (opts.GlobalAnnEnabled || opts.RelayWithoutGlobalAnn) {
if opts.RelaysEnabled {
relayService = relay.NewService(cfg, tlsCfg)
mainService.Add(relayService)
}

View File

@ -43,7 +43,6 @@ func TestDefaultValues(t *testing.T) {
ReconnectIntervalS: 60,
RelaysEnabled: true,
RelayReconnectIntervalM: 10,
RelayWithoutGlobalAnn: false,
StartBrowser: true,
UPnPEnabled: true,
UPnPLeaseM: 60,
@ -173,7 +172,6 @@ func TestOverriddenValues(t *testing.T) {
ReconnectIntervalS: 6000,
RelaysEnabled: false,
RelayReconnectIntervalM: 20,
RelayWithoutGlobalAnn: true,
StartBrowser: false,
UPnPEnabled: false,
UPnPLeaseM: 90,

View File

@ -19,7 +19,6 @@ type OptionsConfiguration struct {
ReconnectIntervalS int `xml:"reconnectionIntervalS" json:"reconnectionIntervalS" default:"60"`
RelaysEnabled bool `xml:"relaysEnabled" json:"relaysEnabled" default:"true"`
RelayReconnectIntervalM int `xml:"relayReconnectIntervalM" json:"relayReconnectIntervalM" default:"10"`
RelayWithoutGlobalAnn bool `xml:"relayWithoutGlobalAnn" json:"relayWithoutGlobalAnn" default:"false"`
StartBrowser bool `xml:"startBrowser" json:"startBrowser" default:"true"`
UPnPEnabled bool `xml:"upnpEnabled" json:"upnpEnabled" default:"true"`
UPnPLeaseM int `xml:"upnpLeaseMinutes" json:"upnpLeaseMinutes" default:"60"`