From 2f003c5c169ea8356b8cda531cfaecf562faf7d0 Mon Sep 17 00:00:00 2001 From: Tnze Date: Sun, 16 Jun 2024 17:16:12 +0800 Subject: [PATCH] fix error handling error --- bot/pinglist.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bot/pinglist.go b/bot/pinglist.go index 02473cd..71a4653 100644 --- a/bot/pinglist.go +++ b/bot/pinglist.go @@ -49,7 +49,7 @@ func pingAndList(ctx context.Context, addr string, conn *mcnet.Conn) (data []byt defer func() { // Reset deadline if err2 := conn.Socket.SetDeadline(time.Time{}); err2 != nil { - if err2 == nil { + if err == nil { err = err2 } return