Setting TCPSocket timeout has no effect ---------------------------------------
Key: JRUBY-6098 URL: https://jira.codehaus.org/browse/JRUBY-6098 Project: JRuby Issue Type: Bug Components: Core Classes/Modules Affects Versions: JRuby 1.6RC1 Environment: # java -version java version "1.6.0_22" OpenJDK Runtime Environment (IcedTea6 1.10.2) (suse-4.3.1-i386) OpenJDK Server VM (build 20.0-b11, mixed mode) Reporter: Xuân Baldauf For a TCPSocket socket, {noformat}socket.setsockopt(Socket::SOL_SOCKET,TCPSocket::SO_RCVTIMEO, 1000){noformat} has no effect, as {noformat} Timeout::timeout(1) do socket.read end {noformat} has no effect, as {noformat}socket.to_channel.socket.setSoTimeout(1000){noformat} has no effect. Thus, there is no real means to prevent resource leaks or filedescriptor leaks in a networked application where remote hosts may not respond (and thus not properly close the connection) from time to time, as the app itself will read indefinitely once it attempts to read. -- This message is automatically generated by JIRA. 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