Skip to content

Feature Request: Specify Error in #close_cb #9

@HoneyryderChuck

Description

@HoneyryderChuck

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions