Merge pull request #3184 from chengzhichao-xydt/codex/ws-body-close

fix(channels): explicitly ignore resp.Body.Close() errors in websocket dial cleanup
This commit is contained in:
Mauro
2026-06-26 18:10:06 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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()