Skip to content

Fix type missmatch for set_opts functions#41

Merged
rawhat merged 2 commits intorawhat:masterfrom
vshakitskiy:setopts-missmatch
Mar 5, 2026
Merged

Fix type missmatch for set_opts functions#41
rawhat merged 2 commits intorawhat:masterfrom
vshakitskiy:setopts-missmatch

Conversation

@vshakitskiy
Copy link
Copy Markdown
Contributor

@karlsson
Copy link
Copy Markdown
Contributor

Since the reason type returned by Erlang for ssl:setopts is defines as just term() I guess this is the safest way to go. There is the type socket.SocketReason defined in glisten that seems to cover most reasons (einval for instance) but there is no guarantee it covers all there I think.
What you will lose now is how to see the fault that actually occurred.

@rawhat
Copy link
Copy Markdown
Owner

rawhat commented Mar 5, 2026

I wish there was a more well-defined list of errors we could get here. It kinda sucks to lose the context here, even if it's just being discarded most of the time. I do think this is more accurate, but I was leaving this open-ended to potentially eventually actually expose these. But I think that can be a problem to solve later.

@rawhat rawhat merged commit 1e3255e into rawhat:master Mar 5, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants