-
Notifications
You must be signed in to change notification settings - Fork 167
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
Consistenty - IOError
vs EBADF
?
#798
Comments
IOError
vs EBADF
?
See <ruby/openssl#798> for more details.
Calling read/write on a closed socket is a user error, but hanging indefinitely doesn't seem ideal. I think we can manage a flag in What should happen if a thread closes |
I'm on the fence about how this should work. On the one hand, I understand someone might call There are two options:
As we see in my example here, and your response about how should @ko1 do you have any thoughts about it? I know you believe that
I also believe this is a problem with the program. |
SSLSocket
error conditions are not consistent withIO
.io.close
followed byio.read
can result inEBADF
rather thanIOError
.sync_close
,io.close
followed byio.read
will hang. Even if the underlying IO is not closed, I don't think theSSLSocket
instance should continue to work after being closed?Reproduction:
Is this something we can improve?
The text was updated successfully, but these errors were encountered: