Skip to content

Commit

Permalink
cmd/pgmap: fix missing STUN flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rkonfj committed Dec 27, 2024
1 parent 5871d0c commit cdbb6eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/pgmap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func main() {
flag.IntVar(&logLevel, "loglevel", int(slog.LevelInfo), "log level (default is 0:info)")
flag.Var(&stuns, "stun", "stun server for peers NAT traversal (leave blank to disable NAT traversal)")

commandConfig := peermap.Config{STUNs: stuns}
commandConfig := peermap.Config{}
flag.StringVar(&commandConfig.Listen, "listen", "127.0.0.1:9987", "")
flag.StringVar(&commandConfig.Listen, "l", "127.0.0.1:9987", "listen http address")
flag.StringVar(&commandConfig.SecretKey, "secret-key", "", "key to generate network secret (defaut generate a random one)")
Expand All @@ -53,6 +53,8 @@ func main() {
flag.Usage = usage
flag.Parse()

commandConfig.STUNs = stuns

slog.SetLogLoggerLevel(slog.Level(logLevel))
if err := run(commandConfig, configPath); err != nil {
fmt.Printf("Error: %s\n", err)
Expand Down

0 comments on commit cdbb6eb

Please sign in to comment.