-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
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_cbneed. - pass the exception to the
#close_cbcallback as argument, and let the user decide what to do with it.
Metadata
Metadata
Assignees
Labels
No labels