From 892a5e563a0cdd8a7c9bb45d149b6823c236e5c7 Mon Sep 17 00:00:00 2001 From: WeidiDeng Date: Mon, 28 Oct 2024 14:10:46 +0800 Subject: [PATCH] set error after listener closed --- layer4/listener.go | 1 + 1 file changed, 1 insertion(+) diff --git a/layer4/listener.go b/layer4/listener.go index 33622d7..d2e4ae5 100644 --- a/layer4/listener.go +++ b/layer4/listener.go @@ -135,6 +135,7 @@ func (l *listener) loop() { conn, err := l.Listener.Accept() // listener closed if l.closed.Load() { + l.err = net.ErrClosed break }