From 5e08b2e9f6bb3f8391faa8fdf7acdc167c3a6f01 Mon Sep 17 00:00:00 2001 From: linsongzheng Date: Thu, 12 Sep 2024 21:08:31 +0800 Subject: [PATCH] remove unnecessary code --- pkg/msg/handler.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pkg/msg/handler.go b/pkg/msg/handler.go index dc211173..8673b0cd 100644 --- a/pkg/msg/handler.go +++ b/pkg/msg/handler.go @@ -54,10 +54,6 @@ func (d *Dispatcher) sendLoop() { for { select { case <-d.doneCh: - // need to clear all message - // Otherwise, it will memory leak when sendCh is full. - for range d.sendCh { - } return case m := <-d.sendCh: _ = WriteMsg(d.rw, m)