Open dmorn opened 4 years ago
Close #26.
I'm doing graceful shutdowns by wrapping the RTMP server and adding context to the ListenAndServe function
ListenAndServe
func (s *Server) ListenAndServe(ctx context.Context) error { go func() { <-ctx.Done() s.rtmps.Close() }() return s.rtmps.ListenAndServe() }
When the context is canceled, ListenAndServe will stop blocking.
Close #26.
I'm doing graceful shutdowns by wrapping the RTMP server and adding context to the
ListenAndServe
functionWhen the context is canceled,
ListenAndServe
will stop blocking.