From 1bd2e845270cf645e25900abe187c69110e104bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E6=99=BA=E8=B6=850668000959?= Date: Fri, 26 Jun 2026 22:15:03 +0800 Subject: [PATCH] fix(channels): explicitly ignore resp.Body.Close() errors in websocket dial cleanup --- pkg/channels/pico/client.go | 2 +- pkg/channels/whatsapp/whatsapp.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/channels/pico/client.go b/pkg/channels/pico/client.go index 04d7323f9..3551632e2 100644 --- a/pkg/channels/pico/client.go +++ b/pkg/channels/pico/client.go @@ -88,7 +88,7 @@ func (c *PicoClientChannel) dial() error { ws, resp, err := websocket.DefaultDialer.DialContext(c.ctx, c.config.URL, header) if resp != nil && resp.Body != nil { - resp.Body.Close() + _ = resp.Body.Close() } if err != nil { return err diff --git a/pkg/channels/whatsapp/whatsapp.go b/pkg/channels/whatsapp/whatsapp.go index 4c338b5f4..da59169d0 100644 --- a/pkg/channels/whatsapp/whatsapp.go +++ b/pkg/channels/whatsapp/whatsapp.go @@ -62,7 +62,7 @@ func (c *WhatsAppChannel) Start(ctx context.Context) error { conn, resp, err := dialer.Dial(c.url, nil) if resp != nil { - resp.Body.Close() + _ = resp.Body.Close() } if err != nil { c.cancel()