func (s *Stream) Close() {
	// get mutex
	s.mutex.Lock()
	defer s.mutex.Unlock()

	// set flag
	s.closed = true

	// close active change stream
	if s.current != nil {
		_ = s.current.Close()
	}
}
func (s *Stream) Close() {
	
	s.mutex.Lock()
	defer s.mutex.Unlock()

	
	s.closed = true

	
	if s.current != nil {
		_ = s.current.Close()
	}
}
func ( s * Stream ) Close ( ) { // get mutex s . mutex . Lock ( ) defer s . mutex . Unlock ( ) // set flag s . closed = true // close active change stream if s . current != nil { _ = s . current . Close ( ) } }
// Close will close the stream.
Close will close the stream .