Manager: improve error message when unable to create UPnP/SSDP server
Rather than just print the error message ("error creating UPnP/SSDP server"), it now explains what the effect is of this error (workers unable to automatically find this Manager) and how to solve it (pass `-manager URL` to the Worker).
This commit is contained in:
parent
93a3436495
commit
c87358b89b
@ -445,7 +445,13 @@ func installSignalHandler(cancelFunc context.CancelFunc) {
|
||||
func makeAutoDiscoverable(urls []url.URL) *upnp_ssdp.Server {
|
||||
ssdp, err := upnp_ssdp.NewServer(log.Logger)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Msg("error creating UPnP/SSDP server")
|
||||
strUrls := make([]string, len(urls))
|
||||
for idx := range urls {
|
||||
strUrls[idx] = urls[idx].String()
|
||||
}
|
||||
log.Error().Strs("urls", strUrls).Msg("Unable to create UPnP/SSDP server. " +
|
||||
"This means that Workers will not be able to automatically find this Manager. " +
|
||||
"Run them with the `-manager URL` argument, picking a URL from this list.")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user