diff options
Diffstat (limited to 'gemini')
-rw-r--r-- | gemini/serve.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gemini/serve.go b/gemini/serve.go index 01e186f..a439ce0 100644 --- a/gemini/serve.go +++ b/gemini/serve.go @@ -38,9 +38,8 @@ func NewServer( ) (sr.Server, error) { s := &server{handler: handler} - if strings.IndexByte(hostname, ':') < 0 { - hostname = net.JoinHostPort(hostname, "1965") - } + hostname = internal.JoinDefaultPort(hostname, "1965") + address = internal.JoinDefaultPort(address, "1965") internalServer, err := internal.NewServer(ctx, hostname, network, address, errorLog, s.handleConn) if err != nil { |