Skip to content

Commit ab7fdf8

Browse files
R4R3D1FFemcfarlane
andauthored
Fix ReadTimeout incorrectly used in Write Deadline
Co-authored-by: Edward McFarlane <[email protected]> Signed-off-by: R4R3D1FF <[email protected]>
1 parent b865468 commit ab7fdf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

handler.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ func (h *Handler) ServeHTTP(responseWriter http.ResponseWriter, request *http.Re
259259
if h.spec.ReadTimeout != 0 {
260260
rc := http.NewResponseController(responseWriter)
261261
rc.SetReadDeadline(time.Now().Add(h.spec.ReadTimeout))
262-
rc.SetWriteDeadline(time.Now().Add(h.spec.ReadTimeout))
262+
rc.SetWriteDeadline(time.Now().Add(h.spec.WriteTimeout))
263263
}
264264

265265
// We don't need to defer functions to close the request body or read to

0 commit comments

Comments
 (0)