]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/blobdiff - lib/rbot/timer.rb
greed: refactor and prepare for more complete play
[user/henk/code/ruby/rbot.git] / lib / rbot / timer.rb
index 8e2a6a4a656476c2ab01bbca12cbaa863ebf135c..64b0ee431d4aeb261541e43bda38f31dc9953770 100644 (file)
@@ -214,7 +214,10 @@ class Timer
   end
 
   def stop
-    raise 'already stopped' unless @thread
+    unless @thread
+      warning 'trying to stop already stopped timer'
+      return
+    end
     debug "stopping timer #{self}..."
     @stopping = true
     self.synchronize { @tick.signal }