Kaynağa Gözat

cmd/syncthing: Listening on a 0 port is not valid (fixes #2926)

Audrius Butkevicius 9 yıl önce
ebeveyn
işleme
393798098c
1 değiştirilmiş dosya ile 3 ekleme ve 0 silme
  1. 3 0
      cmd/syncthing/main.go

+ 3 - 0
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