diff --git a/internal/capture/screencast.go b/internal/capture/screencast.go index 394f0abf..4583c240 100644 --- a/internal/capture/screencast.go +++ b/internal/capture/screencast.go @@ -27,8 +27,8 @@ type ScreencastManagerCtx struct { image types.Sample sample chan types.Sample - sampleStop chan interface{} - sampleUpdate chan interface{} + sampleStop chan struct{} + sampleUpdate chan struct{} enabled bool started bool @@ -44,8 +44,8 @@ func screencastNew(enabled bool, pipelineStr string) *ScreencastManagerCtx { manager := &ScreencastManagerCtx{ logger: logger, pipelineStr: pipelineStr, - sampleStop: make(chan interface{}), - sampleUpdate: make(chan interface{}), + sampleStop: make(chan struct{}), + sampleUpdate: make(chan struct{}), enabled: enabled, started: false, } diff --git a/internal/capture/stream.go b/internal/capture/stream.go index bf93d757..a6450eed 100644 --- a/internal/capture/stream.go +++ b/internal/capture/stream.go @@ -26,8 +26,8 @@ type StreamManagerCtx struct { pipelineStr func() string sample chan types.Sample - sampleStop chan interface{} - sampleUpdate chan interface{} + sampleStop chan struct{} + sampleUpdate chan struct{} listeners map[uintptr]*func(sample types.Sample) listenersMu sync.Mutex @@ -43,8 +43,8 @@ func streamNew(codec codec.RTPCodec, pipelineStr func() string, video_id string) logger: logger, codec: codec, pipelineStr: pipelineStr, - sampleStop: make(chan interface{}), - sampleUpdate: make(chan interface{}), + sampleStop: make(chan struct{}), + sampleUpdate: make(chan struct{}), listeners: map[uintptr]*func(sample types.Sample){}, } diff --git a/internal/desktop/manager.go b/internal/desktop/manager.go index ddf8fe65..2dc3771e 100644 --- a/internal/desktop/manager.go +++ b/internal/desktop/manager.go @@ -19,7 +19,7 @@ var mu = sync.Mutex{} type DesktopManagerCtx struct { logger zerolog.Logger wg sync.WaitGroup - shutdown chan interface{} + shutdown chan struct{} emmiter events.EventEmmiter config *config.Desktop } @@ -27,7 +27,7 @@ type DesktopManagerCtx struct { func New(config *config.Desktop) *DesktopManagerCtx { return &DesktopManagerCtx{ logger: log.With().Str("module", "desktop").Logger(), - shutdown: make(chan interface{}), + shutdown: make(chan struct{}), emmiter: events.New(), config: config, } diff --git a/internal/websocket/manager.go b/internal/websocket/manager.go index 11cc3392..573aa20d 100644 --- a/internal/websocket/manager.go +++ b/internal/websocket/manager.go @@ -30,7 +30,7 @@ func New( return &WebSocketManagerCtx{ logger: logger, - shutdown: make(chan interface{}), + shutdown: make(chan struct{}), sessions: sessions, desktop: desktop, handler: handler.New(sessions, desktop, capture, webrtc), @@ -41,7 +41,7 @@ func New( type WebSocketManagerCtx struct { logger zerolog.Logger wg sync.WaitGroup - shutdown chan interface{} + shutdown chan struct{} sessions types.SessionManager desktop types.DesktopManager handler *handler.MessageHandlerCtx