safeweb: add Server.Close method (#13160)

Updates https://github.com/tailscale/corp/issues/14881

Signed-off-by: Andrew Lytvynov <awly@tailscale.com>
This commit is contained in:
Andrew Lytvynov
2024-08-15 12:49:04 -05:00
committed by GitHub
parent e107977f75
commit d88be7cddf
2 changed files with 13 additions and 0 deletions

View File

@@ -300,3 +300,8 @@ func (s *Server) ServeRedirectHTTP(ln net.Listener, fqdn string) error {
func (s *Server) Serve(ln net.Listener) error {
return s.h.Serve(ln)
}
// Close closes all client connections and stops accepting new ones.
func (s *Server) Close() error {
return s.h.Close()
}