close listeners when removing them from our array
commite83756512c44294137ee3362cf131eed70663fb1
authorEric Wong <normalperson@yhbt.net>
Fri, 10 Apr 2009 06:09:03 +0000 (9 23:09 -0700)
committerEric Wong <normalperson@yhbt.net>
Fri, 10 Apr 2009 17:08:21 +0000 (10 10:08 -0700)
tree023fbe95a9390278f13b444c7ddef520c43c9406
parente26ebc985b882c38da50fb0104791a5f2c0f8522
close listeners when removing them from our array

This fixes a long-standing bug where listeners would be removed
from the known listener set during a reload but never correctly
shut down (until reexec).

Additionally, test_server was working around this bug (my fault,
subconciously) as teardown did not unbind the socket, requiring
the tests to grab a new port.
lib/unicorn.rb
test/unit/test_server.rb