mirror of
https://github.com/AlexxIT/go2rtc.git
synced 2025-09-27 12:42:18 +08:00
chore: remove mutexes
This commit is contained in:
@@ -149,19 +149,12 @@ func (s *Sender) Start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Sender) Wait() {
|
func (s *Sender) Wait() {
|
||||||
s.mu.Lock()
|
if done := s.done; done != nil {
|
||||||
done := s.done
|
|
||||||
s.mu.Unlock()
|
|
||||||
|
|
||||||
if done != nil {
|
|
||||||
<-done
|
<-done
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Sender) State() string {
|
func (s *Sender) State() string {
|
||||||
s.mu.Lock()
|
|
||||||
defer s.mu.Unlock()
|
|
||||||
|
|
||||||
if s.buf == nil {
|
if s.buf == nil {
|
||||||
return "closed"
|
return "closed"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user