Close shuts down the server with a timeout of 5s.
()
| 193 | |
| 194 | // Close shuts down the server with a timeout of 5s. |
| 195 | func (s *Server) Close() error { |
| 196 | ctx, cancel := context.WithTimeout(context.Background(), time.Second*5) |
| 197 | defer cancel() |
| 198 | return s.Shutdown(ctx) |
| 199 | } |