Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CurlDriver::__destruct is giving me problems #24

Open
ebonit opened this issue Oct 13, 2016 · 1 comment
Open

CurlDriver::__destruct is giving me problems #24

ebonit opened this issue Oct 13, 2016 · 1 comment

Comments

@ebonit
Copy link

ebonit commented Oct 13, 2016

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?

@pret691
Copy link

pret691 commented Oct 24, 2017

Got the same error with the same line of code, but I recognized two different behaviors.

I created a service to get the balance related to an account. If I call the service ...

... direct from a controller -> it works pretty good
... within another function of the same serviceclass -> curl_close(): supplied resource is not a valid cURL handle resource

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants