From 1080e95bb4d3ea5a7b8c4281ff22fdfe72b2206b Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Tue, 23 Feb 2021 12:10:52 -0500 Subject: [PATCH] server: Document use of context in ListenAndServe --- server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server.go b/server.go index 59953ac..94103bb 100644 --- a/server.go +++ b/server.go @@ -172,7 +172,8 @@ func (srv *Server) Shutdown(ctx context.Context) error { // ListenAndServe listens for requests at the server's configured address. // ListenAndServe listens on the TCP network address srv.Addr and then calls -// Serve to handle requests on incoming connections. +// Serve to handle requests on incoming connections. If the provided +// context expires, ListenAndServe closes l and returns the context's error. // // If srv.Addr is blank, ":1965" is used. //