Skip to content

Commit

Permalink
examples/chat-with-mdns: default to a random port (#2896)
Browse files Browse the repository at this point in the history
Make sure it properly works if you start multiple instances on the same machine.
  • Loading branch information
Jorropo authored Aug 1, 2024
1 parent 46c6397 commit ae1645d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/chat-with-mdns/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func parseFlags() *config {
flag.StringVar(&c.RendezvousString, "rendezvous", "meetme", "Unique string to identify group of nodes. Share this with your friends to let them connect with you")
flag.StringVar(&c.listenHost, "host", "0.0.0.0", "The bootstrap node host listen address\n")
flag.StringVar(&c.ProtocolID, "pid", "/chat/1.1.0", "Sets a protocol id for stream headers")
flag.IntVar(&c.listenPort, "port", 4001, "node listen port")
flag.IntVar(&c.listenPort, "port", 0, "node listen port (0 pick a random unused port)")

flag.Parse()
return c
Expand Down

0 comments on commit ae1645d

Please sign in to comment.