diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index bba23f956..2e6e9b1df 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -721,6 +721,9 @@ func syncthingMain(runtimeOptions RuntimeOptions) { if err != nil { l.Fatalln("Bad listen address:", err) } + if addr.Port == 0 { + l.Fatalf("Listen address %s: invalid port", uri) + } // Start UPnP var upnpService *upnp.Service