You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently #close_cb is being used as general purpose callback for when something wrong happens and ssl session terminates. This "something wrong" are, from what I saw, standard SSL/TLS errors, and could be handled differently, in a more "ruby way".
My proposal would be: wrap those errors into exception objects (the equivalent to OpenSSL::SSL::SSLError, hopefully with better error messages). After that, one would have two options:
raise the exception (perform ssl session cleanups in an ensure block); remove the #close_cb need.
pass the exception to the #close_cb callback as argument, and let the user decide what to do with it.
The text was updated successfully, but these errors were encountered:
Currently
#close_cb
is being used as general purpose callback for when something wrong happens and ssl session terminates. This "something wrong" are, from what I saw, standard SSL/TLS errors, and could be handled differently, in a more "ruby way".My proposal would be: wrap those errors into exception objects (the equivalent to
OpenSSL::SSL::SSLError
, hopefully with better error messages). After that, one would have two options:#close_cb
need.#close_cb
callback as argument, and let the user decide what to do with it.The text was updated successfully, but these errors were encountered: