Socket#close raises Errno::EBADF on half closed socket
------------------------------------------------------
Key: JRUBY-2147
URL: http://jira.codehaus.org/browse/JRUBY-2147
Project: JRuby
Issue Type: Bug
Components: Core Classes/Modules
Affects Versions: JRuby 1.1RC2
Environment: Windows XP Pro, Java 1.5
Reporter: Daniel Berger
Calling Socket#close on a socket that hasn't had both ends closed should not
raise an error. This snippet demonstrates the problem:
{noformat}
require 'socket'
socket = TCPServer.new('localhost', 9999)
socket.close_read
p socket.closed? # False
socket.close unless socket.closed?
{noformat}
This raises an Errno::EBADF in Jruby, but works fine in MRI
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email