From 029cd5b52db8385d221690cbf75e5e4825e145d8 Mon Sep 17 00:00:00 2001 From: tjpcc Date: Wed, 11 Jan 2023 13:19:42 -0700 Subject: much more extensive gus/gemini testing --- gemini/serve.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gemini/serve.go') 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() -- cgit v1.2.3