Skip to content

CurlDriver::__destruct is giving me problems #24

@ebonit

Description

@ebonit

I ran into problems with the curl driver.
I iterate through some addresses and fire the 'getreceivedbyaddress' command. The first address gave me the correct output but as soon as I get to the second address I get:

[ErrorException]
curl_close(): supplied resource is not a valid cURL handle resource

[ErrorException]
curl_setopt_array(): supplied resource is not a valid cURL handle resource

I commented the following line from the destructor and then everything works like a charm.
public function __destruct()
{
if (null !== self::$ch) {
// curl_close(self::$ch);
}
}
obvious I can also set self::$ch to null...

I do not understand why this is. curl_close always throws this exception after the first command. No matter when I call it. any clue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions