From 459a5f5508683c9e2d152a5adcf153777b5629b9 Mon Sep 17 00:00:00 2001 From: Yonle Date: Sun, 23 Jun 2024 10:01:59 +0700 Subject: [PATCH] =?UTF-8?q?close()=20=D0=BD=D0=B5=20=D1=8F=D0=B2=D0=BB?= =?UTF-8?q?=D1=8F=D0=B5=D1=82=D1=81=D1=8F=20=D0=BE=D0=B1=D1=8F=D0=B7=D0=B0?= =?UTF-8?q?=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=BC,=20=D1=82=D0=B0?= =?UTF-8?q?=D0=BA=20=D1=87=D1=82=D0=BE...=20=D0=BB=D0=B0=D0=B4=D0=BD=D0=BE?= =?UTF-8?q?.=20=D0=B4=D0=B0=D0=B2=D0=B0=D0=B9=20=D0=BF=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=BE=20=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=B5=D0=BC=20?= =?UTF-8?q?=D0=B2=D0=BE=D1=82=20=D1=82=D0=B0=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Yonle --- bouncer.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/bouncer.go b/bouncer.go index 6546d62..e6130e6 100644 --- a/bouncer.go +++ b/bouncer.go @@ -215,10 +215,6 @@ func (s *Session) CountEvents(subid string) int { */ func (s *Session) WriteJSON(data *[]interface{}) { - if s.destroyed { - return - } - JsonData, _ := json.Marshal(*data) s.UpstreamMessage <- &JsonData @@ -240,8 +236,6 @@ func (s *Session) OpenSubscriptions(conn *websocket.Conn) { } func (s *Session) Destroy(_ int, _ string) error { - close(s.UpstreamMessage) - s.destroyed = true s.relaysMu.Lock()