From 9d9ae288bddd00e469fab17dde9aae8a5e2b16d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Wed, 10 Aug 2022 14:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/apps/log_writer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/internal/apps/log_writer.go b/internal/apps/log_writer.go index a09bf00..02ff473 100644 --- a/internal/apps/log_writer.go +++ b/internal/apps/log_writer.go @@ -89,7 +89,10 @@ func (this *LogWriter) Write(message string) { } } - this.c <- message + select { + case this.c <- message: + default: + } } func (this *LogWriter) Close() {