summaryrefslogtreecommitdiff
path: root/gemini/serve.go
diff options
context:
space:
mode:
authortjpcc <tjp@ctrl-c.club>2023-01-11 13:19:42 -0700
committertjpcc <tjp@ctrl-c.club>2023-01-11 13:19:42 -0700
commit029cd5b52db8385d221690cbf75e5e4825e145d8 (patch)
tree12389a7ee22822ff482ae87d42acca0a05b5cd7f /gemini/serve.go
parent4969e33e28e09581a3b380dec7ebdc8594d67838 (diff)
much more extensive gus/gemini testing
Diffstat (limited to 'gemini/serve.go')
-rw-r--r--gemini/serve.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/gemini/serve.go b/gemini/serve.go
index f9a8a1c..bc13531 100644
--- a/gemini/serve.go
+++ b/gemini/serve.go
@@ -32,10 +32,12 @@ func NewServer(
return nil, err
}
+ addr := listener.Addr()
+
s := &Server{
ctx: ctx,
- network: network,
- address: address,
+ network: addr.Network(),
+ address: addr.String(),
wg: &sync.WaitGroup{},
listener: tls.NewListener(listener, tlsConfig),
handler: handler,
@@ -59,7 +61,7 @@ func (s *Server) Serve() error {
s.ctx, s.cancel = context.WithCancel(s.ctx)
s.wg.Add(1)
- go s.propagateCancel()
+ s.propagateCancel()
for {
conn, err := s.listener.Accept()