()
| 507 | } |
| 508 | |
| 509 | func (s *Server) Close() error { |
| 510 | s.log.Info("Shutting down function stream server") |
| 511 | if httpSvr := s.httpSvr.Load(); httpSvr != nil { |
| 512 | if err := httpSvr.Close(); err != nil { |
| 513 | return err |
| 514 | } |
| 515 | } |
| 516 | if s.Manager != nil { |
| 517 | err := s.Manager.Close() |
| 518 | if err != nil { |
| 519 | return err |
| 520 | } |
| 521 | } |
| 522 | s.log.Info("Function stream server is shut down") |
| 523 | return nil |
| 524 | } |
| 525 | |
| 526 | func (s *Server) handleRestError(e error) { |
| 527 | if e == nil { |