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

clear OpenSSL thread error queue each time, might help with certain f… #8103

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/openssl.cr
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ module OpenSSL
end

protected def fetch_error_details
code = LibCrypto.err_get_error
message = String.new(LibCrypto.err_error_string(code, nil)) unless code == 0
message = nil
while((code = LibCrypto.err_get_error) != 0)
message ||= ""
message += String.new(LibCrypto.err_error_string(code, nil))
end
{code, message || "Unknown or no error"}
end
end
Expand Down