diff --git a/rpcclient/infrastructure.go b/rpcclient/infrastructure.go index 592c0dde..aedf18b7 100644 --- a/rpcclient/infrastructure.go +++ b/rpcclient/infrastructure.go @@ -1382,6 +1382,7 @@ func dial(config *ConnConfig) (*websocket.Conn, error) { // cases above apply. return nil, errors.New(resp.Status) } + resp.Body.Close() return wsConn, nil }