mirror of
https://github.com/tailscale/tailscale.git
synced 2025-04-16 19:51:41 +00:00
safeweb: add a Shutdown method to the Server type (#14048)
Updates #14047 Change-Id: I2d20454c715b11ad9c6aad1d81445e05a170c3a2 Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
This commit is contained in:
parent
64d70fb718
commit
6ff85846bc
@ -71,6 +71,7 @@ package safeweb
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"cmp"
|
"cmp"
|
||||||
|
"context"
|
||||||
crand "crypto/rand"
|
crand "crypto/rand"
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
@ -416,3 +417,7 @@ func (s *Server) ListenAndServe(addr string) error {
|
|||||||
func (s *Server) Close() error {
|
func (s *Server) Close() error {
|
||||||
return s.h.Close()
|
return s.h.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Shutdown gracefully shuts down the server without interrupting any active
|
||||||
|
// connections. It has the same semantics as[http.Server.Shutdown].
|
||||||
|
func (s *Server) Shutdown(ctx context.Context) error { return s.h.Shutdown(ctx) }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user