Skip to content

Commit b748da6

Browse files
committed
cmd/skylight,cmd/sunlight: require Listen addresses
1 parent 15c2b7b commit b748da6

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

cmd/skylight/skylight.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,9 @@ func main() {
455455
s.TLSConfig.KeyLogWriter = keylog.Writer
456456
}
457457

458+
if len(c.Listen) == 0 {
459+
fatalError(logger, "no Listen addresses specified in config")
460+
}
458461
serveGroup, ctx := errgroup.WithContext(ctx)
459462
for _, addr := range c.Listen {
460463
l, err := net.Listen("tcp", addr)

cmd/sunlight/sunlight.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,9 @@ func main() {
756756
s.TLSConfig.KeyLogWriter = keylog.Writer
757757
}
758758

759+
if len(c.Listen) == 0 {
760+
fatalError(logger, "no Listen addresses specified in config")
761+
}
759762
for _, addr := range c.Listen {
760763
l, err := net.Listen("tcp", addr)
761764
if err != nil {

0 commit comments

Comments
 (0)