Changeset 581 in code for trunk/cmd/soju/main.go


Ignore:
Timestamp:
Sep 9, 2021, 8:06:31 AM (4 years ago)
Author:
rafael
Message:

Check for TLS config in wss listeners

Previously http.Server.ListenAndServeTLS would return a not very helpful
error about a failed open. This adds a check similar to the one in the
ircs case that should make it clearer to operators what the error is.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cmd/soju/main.go

    r531 r581  
    157157                        }()
    158158                case "wss":
     159                        if tlsCfg == nil {
     160                                log.Fatalf("failed to listen on %q: missing TLS configuration", listen)
     161                        }
    159162                        addr := u.Host
    160163                        if _, _, err := net.SplitHostPort(addr); err != nil {
Note: See TracChangeset for help on using the changeset viewer.