From b5148e90cb92bf1a3a449bc3117be2d8af67d90a Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Sun, 5 Feb 2023 11:29:51 +0300 Subject: [PATCH] return after errorHandler Signed-off-by: Vasiliy Tolstov --- handler.go | 1 + 1 file changed, 1 insertion(+) diff --git a/handler.go b/handler.go index abdf6f2..bfe8e1d 100644 --- a/handler.go +++ b/handler.go @@ -117,6 +117,7 @@ func (h *httpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { break } else if err == rhttp.ErrMethodNotAllowed && !h.registerRPC { h.errorHandler(ctx, nil, w, r, fmt.Errorf("not matching route found"), http.StatusNotFound) + return } }