[Mongrel] [Patch] HttpServer.port reports the bound port
Corey Jewett
ml at syntheticplayground.com
Sun Aug 5 20:02:12 EDT 2007
This is for when you pass mongrel 0 for the port and the OS assigns
an open one.
Corey
--- mongrel-1.0.1/lib/mongrel.rb 2007-08-05 15:29:59.000000000
-0700
+++ mongrel-1.0.1/lib/mongrel.rb.zero_port_fix 2007-08-05
15:29:23.000000000 -0700
@@ -560,7 +560,7 @@
@socket = TCPServer.new(host, port)
@classifier = URIClassifier.new
@host = host
- @port = port
+ @port = @socket.addr[1]
@workers = ThreadGroup.new
@timeout = timeout
@num_processors = num_processors
More information about the Mongrel-users
mailing list