Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

TcpServer#accept isn't aborted when an exception is raised through Thread#raise #159

Closed
dbussink opened this Issue · 1 comment

1 participant

@dbussink
Owner

The following little script shows the issue:

require 'socket'
socket = TCPServer.new("localhost", 50000)
acceptor = Thread.new do
 
  begin
    puts "Waiting..."
    socket.accept
    puts "Socket accepted"
  rescue
  end
end
 
sleep 1
 
acceptor.raise
acceptor.join

On MRI this finishes after 1 second, but on Rubinius it keeps running forever

@dbussink
Owner

Fixed in b412c1b

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.