summaryrefslogtreecommitdiff
path: root/finger/serve.go
diff options
context:
space:
mode:
Diffstat (limited to 'finger/serve.go')
-rw-r--r--finger/serve.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/finger/serve.go b/finger/serve.go
index 5675dcf..1bc69b8 100644
--- a/finger/serve.go
+++ b/finger/serve.go
@@ -5,7 +5,6 @@ import (
"fmt"
"io"
"net"
- "strings"
sr "tildegit.org/tjp/sliderule"
"tildegit.org/tjp/sliderule/internal"
@@ -30,9 +29,8 @@ func NewServer(
) (sr.Server, error) {
fs := &fingerServer{handler: handler}
- if strings.IndexByte(hostname, ':') < 0 {
- hostname = net.JoinHostPort(hostname, "79")
- }
+ hostname = internal.JoinDefaultPort(hostname, "79")
+ address = internal.JoinDefaultPort(address, "79")
var err error
fs.Server, err = internal.NewServer(ctx, hostname, network, address, errLog, fs.handleConn)