OSDN Git Service

Refactoring. Ensure that floodgate's scheduling always works.
authorbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Mon, 4 Feb 2008 03:50:01 +0000 (03:50 +0000)
committerbeatles <beatles@b8c68f68-1e22-0410-b08e-880e1f8202b4>
Mon, 4 Feb 2008 03:50:01 +0000 (03:50 +0000)
shogi-server

index 3ab2267..9b8202f 100755 (executable)
@@ -112,10 +112,11 @@ class League
             sleep(20)
             next if Time.now < @next_time
             match_game
             sleep(20)
             next if Time.now < @next_time
             match_game
-            charge
           rescue Exception => ex 
             # ignore errors
             log_error("[in Floodgate's thread] #{ex}")
           rescue Exception => ex 
             # ignore errors
             log_error("[in Floodgate's thread] #{ex}")
+          ensure
+            charge
           end
         end
       end
           end
         end
       end