Add support for multiple announce servers (fixes #677)

Somebody owes me a beer.
This commit is contained in:
Audrius Butkevicius authored and Jakob Borg committed 2014-11-30 13:25:06 +01:00
1 parent 78981862be
commit fd2d2c035e
9 files changed
+162 -80

No files matched your search

+2 -2
View File
@@ -826,7 +826,7 @@ func renewUPnP(port int) {
if forwardedPort != 0 {
externalPort = forwardedPort
discoverer.StopGlobal()
discoverer.StartGlobal(opts.GlobalAnnServer, uint16(forwardedPort))
discoverer.StartGlobal(opts.GlobalAnnServers, uint16(forwardedPort))
if debugNet {
l.Debugf("Updated UPnP port mapping for external port %d on device %s.", forwardedPort, igd.FriendlyIdentifier())
}
@@ -1098,7 +1098,7 @@ func discovery(extPort int) *discover.Discoverer {
if opts.GlobalAnnEnabled {
l.Infoln("Starting global discovery announcements")
disc.StartGlobal(opts.GlobalAnnServer, uint16(extPort))
disc.StartGlobal(opts.GlobalAnnServers, uint16(extPort))
}
return disc