From 6703a9841931af892cdebaa66c65d2e528786a7f Mon Sep 17 00:00:00 2001 From: ffdfgdfg Date: Wed, 11 Dec 2019 23:32:32 +0800 Subject: [PATCH] fix mux conn read after Stop() method invoked will panic --- lib/mux/conn.go | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/mux/conn.go b/lib/mux/conn.go index 8f6e31f..92d9b2c 100644 --- a/lib/mux/conn.go +++ b/lib/mux/conn.go @@ -293,6 +293,7 @@ copyData: // reset to 60s if timeout and data still available Self.off = 0 if err != nil { + Self.CloseWindow() // also close the window, to avoid read twice return // queue receive stop or time out, break the loop and return } //logs.Warn("pop element", Self.element.l, Self.element.part)