1
0
mirror of https://github.com/golang/go synced 2024-11-26 14:46:47 -07:00

net/http: Sync TimeoutHandler godoc with code.

TimeoutHandler was changed from "ns int64" to "dt time.Duration" on
Nov 30, 2011, but the godoc still refers to "ns".

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/7031050
This commit is contained in:
Matthew Dempsky 2013-01-03 10:06:04 -08:00 committed by Ian Lance Taylor
parent 17eafcd05d
commit 98edf09e67

View File

@ -1327,7 +1327,7 @@ func (srv *Server) ListenAndServeTLS(certFile, keyFile string) error {
// TimeoutHandler returns a Handler that runs h with the given time limit.
//
// The new Handler calls h.ServeHTTP to handle each request, but if a
// call runs for more than ns nanoseconds, the handler responds with
// call runs for longer than its time limit, the handler responds with
// a 503 Service Unavailable error and the given message in its body.
// (If msg is empty, a suitable default message will be sent.)
// After such a timeout, writes by h to its ResponseWriter will return