about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/mongrel/configurator.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/mongrel/configurator.rb b/lib/mongrel/configurator.rb
index 867e89d..cd77b19 100644
--- a/lib/mongrel/configurator.rb
+++ b/lib/mongrel/configurator.rb
@@ -1,7 +1,6 @@
 require 'yaml'
 require 'etc'
 
-
 module Mongrel
   # Implements a simple DSL for configuring a Mongrel server for your
   # purposes.  More used by framework implementers to setup Mongrel
@@ -290,7 +289,10 @@ module Mongrel
     # assumes that you don't want to restart.
     def stop(needs_restart=false)
       @listeners.each {|name,s|
-        s.stop
+        s.stop
+        
+        # XXX Try to get JRuby to wait for the thread to actually stop
+        s.acceptor.join
       }
 
       @needs_restart = needs_restart