From f521373f9baee20a03e18a6dba0bfa0d66cbc224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Wed, 28 Oct 2020 21:50:19 +0100 Subject: [PATCH] should omit comparison to bool constant. --- internal/session/manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/session/manager.go b/internal/session/manager.go index d68d578f..33829f7a 100644 --- a/internal/session/manager.go +++ b/internal/session/manager.go @@ -42,7 +42,7 @@ func (manager *SessionManager) New(id string, admin bool, socket types.WebSocket manager.members[id] = session manager.emmiter.Emit("created", id, session) - if manager.remote.Streaming() != true && len(manager.members) > 0 { + if !manager.remote.Streaming() && len(manager.members) > 0 { manager.remote.StartStream() } @@ -124,7 +124,7 @@ func (manager *SessionManager) Destroy(id string) error { err := session.destroy() delete(manager.members, id) - if manager.remote.Streaming() != false && len(manager.members) <= 0 { + if !manager.remote.Streaming() && len(manager.members) <= 0 { manager.remote.StopStream() }