From 06dc7eed0874e620ac6fb8204707523ad576c37e Mon Sep 17 00:00:00 2001 From: adnano Date: Tue, 23 Feb 2021 22:15:19 -0500 Subject: [PATCH] Remove ErrHandlerTimeout --- gemini.go | 4 ---- handler.go | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/gemini.go b/gemini.go index 0e56231..add3f85 100644 --- a/gemini.go +++ b/gemini.go @@ -17,10 +17,6 @@ var ( // when the response status code does not permit a body. ErrBodyNotAllowed = errors.New("gemini: response status code does not allow body") - // ErrHandlerTimeout is returned on ResponseWriter Write calls - // in handlers which have timed out. - ErrHandlerTimeout = errors.New("gemini: Handler timeout") - // ErrHijacked is returned by ResponseWriter.Write calls when // the underlying connection has been hijacked using the // Hijacker interface. A zero-byte write on a hijacked diff --git a/handler.go b/handler.go index 562f789..c05a066 100644 --- a/handler.go +++ b/handler.go @@ -79,8 +79,7 @@ func StripPrefix(prefix string, h Handler) Handler { // // The new Handler calls h.ServeGemini to handle each request, but // if a call runs for longer than its time limit, the handler responds with a -// 40 Temporary Failure error. After such a timeout, writes by h to its -// ResponseWriter will return ErrHandlerTimeout. +// 40 Temporary Failure error. func TimeoutHandler(h Handler, dt time.Duration) Handler { return &timeoutHandler{ h: h,