dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit fcfdb547638e7800d621d982e7a96a951cdc1806
parent 916bae9a7796c6096780bae3cb49e78fb784d584
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu, 28 Dec 2023 13:23:05 -0500

cleanup

Diffstat:
Mpkg/web/handlers/api/v1/chat.go | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkg/web/handlers/api/v1/chat.go b/pkg/web/handlers/api/v1/chat.go @@ -11,6 +11,7 @@ import ( "dkforest/pkg/web/handlers/streamModals" "dkforest/pkg/web/handlers/usersStreamsManager" hutils "dkforest/pkg/web/handlers/utils" + "errors" "fmt" "github.com/labstack/echo" "net/http" @@ -254,7 +255,7 @@ Loop: topic, msgTyp, err := sub.ReceiveTimeout2(5*time.Second, quit) if err != nil { - if err == pubsub.ErrCancelled { + if errors.Is(err, pubsub.ErrCancelled) { break Loop } c.Response().Flush()