diff --git a/cmd/server/ws.go b/cmd/server/ws.go index 91cc414..09d7e6d 100644 --- a/cmd/server/ws.go +++ b/cmd/server/ws.go @@ -29,10 +29,10 @@ func (s *S) serveWS(w http.ResponseWriter, r *http.Request) error { } defer c.CloseNow() ws := WS{S: s, c: c} - return ws.serve(w, r) + return ws.Serve(w, r) } -func (ws WS) serve(w http.ResponseWriter, r *http.Request) error { +func (ws WS) Serve(w http.ResponseWriter, r *http.Request) error { ctx, can := context.WithCancel(r.Context()) defer can() r = r.WithContext(ctx)