Skip to content

Instantly share code, notes, and snippets.

@jarib
Created January 29, 2010 03:55
Show Gist options
  • Save jarib/289433 to your computer and use it in GitHub Desktop.
Save jarib/289433 to your computer and use it in GitHub Desktop.
$ cat bug.rb
require "socket"
s, i = [], 0
loop do
s << TCPServer.new("localhost", 5000)
p i += 1
sleep 1
end
$ ruby bug.rb
1
2
3
bug.rb:6:in `initialize': Address already in use - bind(2) (Errno::EADDRINUSE)
from bug.rb:6:in `new'
from bug.rb:6
from bug.rb:5:in `loop'
from bug.rb:5
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment