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

workaround for cURL related crashes on some systems #128

Merged
merged 1 commit into from
Sep 22, 2014

Conversation

chetan
Copy link
Contributor

@chetan chetan commented Aug 26, 2014

This is a workaround for the issue described here typhoeus/typhoeus#260.

Not sure if this is the best way to fix this, since there's no current way to pass options directly to the adapter. I think it should be safe enough to set this flag all the time, but not 100% sure.

Some more details on that particular flag: http://curl.haxx.se/libcurl/c/CURLOPT_NOSIGNAL.html

@tjarratt
Copy link
Contributor

Hey @chetan, thanks for providing some context for this, as well as some details on the particular flag you're setting. I'm sorry, but I'm still a little confused about this. The issue on typhoeus doesn't seem to mention httpi or curb so I'm a little lost at what setting this flag in the curb adapter solves.

Does this fix a bug that you encountered with httpi and the curb adapter?

@chetan
Copy link
Contributor Author

chetan commented Sep 2, 2014

@tjarratt it's an issue with the behavior of libcurl which is the underlying library used by curb. I ran into this exact issue in production while using httpi+curb (and not typhoeus), hence the patch.

@rogerleite
Copy link
Member

Hi @chetan thanks for warning us!
For now, if you need to set directly on adapter you can use something like this:

HTTPI.get request do |curb_client|
  curb_client.set(:NOSIGNAL, true)
end

It should works, i didn't test.
@tjarratt i think we can merge.

@chetan
Copy link
Contributor Author

chetan commented Sep 5, 2014

@rogerleite ah, ok. I didn't realize we had access to the underlying client there. That works too.

@rogerleite
Copy link
Member

@chetan it's a "secret" feature! 😎

@tjarratt
Copy link
Contributor

Cool, thanks for enlightening me with the discussion :)

tjarratt added a commit that referenced this pull request Sep 22, 2014
workaround for cURL related crashes on some systems
@tjarratt tjarratt merged commit e587582 into savonrb:master Sep 22, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants