aboutsummaryrefslogtreecommitdiff
path: root/timeout.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2021-02-21 16:06:56 -0500
committerAdnan Maolood <[email protected]>2021-02-21 16:06:56 -0500
commitc3feafa90b854ae7e724b4748db9b27dcefc8d22 (patch)
tree47e2ed6f16821380d9f4717c0821a7b354efafc1 /timeout.go
parentserver: Don't close pending connections after Shutdown (diff)
downloadgo-gemini-c3feafa90b854ae7e724b4748db9b27dcefc8d22.tar.xz
go-gemini-c3feafa90b854ae7e724b4748db9b27dcefc8d22.zip
Move Flush back to ResponseWriter
Diffstat (limited to 'timeout.go')
-rw-r--r--timeout.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/timeout.go b/timeout.go
index b23a895..e5d4b28 100644
--- a/timeout.go
+++ b/timeout.go
@@ -13,8 +13,6 @@ import (
// 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.
-//
-// TimeoutHandler does not support the Hijacker or Flusher interfaces.
func TimeoutHandler(h Handler, dt time.Duration) Handler {
return &timeoutHandler{
h: h,
@@ -108,3 +106,7 @@ func (w *timeoutWriter) writeHeaderLocked(status Status, meta string) {
w.meta = meta
w.wroteHeader = true
}
+
+func (w *timeoutWriter) Flush() error {
+ return nil
+}