about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/rainbows.rb10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/rainbows.rb b/lib/rainbows.rb
index fed0715..480f2d6 100644
--- a/lib/rainbows.rb
+++ b/lib/rainbows.rb
@@ -98,10 +98,12 @@ module Rainbows
   end
 
   def self.quit!
-    @alive = false
-    Rainbows::HttpParser.quit
-    @expire ||= Time.now + (@server.timeout * 2.0)
-    @server.class.const_get(:LISTENERS).map! { |s| s.close rescue nil }.clear
+    unless @expire
+      @alive = false
+      Rainbows::HttpParser.quit
+      @expire = Time.now + (@server.timeout * 2.0)
+      @server.class.const_get(:LISTENERS).map! { |s| s.close rescue nil }.clear
+    end
     false
   end