OSDN Git Service

- shogi_server/player.rb:
authordaigo <beatles@users.sourceforge.jp>
Sun, 25 Apr 2010 04:25:52 +0000 (13:25 +0900)
committerDaigo Moriwaki <daigo at debian dot org>
Sun, 25 Apr 2010 04:25:52 +0000 (13:25 +0900)
  Log a warning message in a case that a player closes a connection suddenly.

I investigated this issue: http://d.hatena.ne.jp/mkomiya/20100424/1272095860

changelog
shogi_server/player.rb

index c35379e..6849b4a 100644 (file)
--- a/changelog
+++ b/changelog
@@ -1,3 +1,10 @@
+2010-04-25  Daigo Moriwaki <daigo at debian dot org>
+
+       * [shogi-server]
+         - shogi_server/player.rb:
+           Log a warning message in a case that a player closes a
+           connection suddenly.
+
 2010-04-13  Daigo Moriwaki <daigo at debian dot org>
 
        * [shogi-server]
 2010-04-13  Daigo Moriwaki <daigo at debian dot org>
 
        * [shogi-server]
index 3302aa7..e156650 100644 (file)
@@ -300,6 +300,7 @@ class Player < BasicPlayer
         $mutex.unlock
       end
     end # enf of while
         $mutex.unlock
       end
     end # enf of while
+    log_warning("%s's socket was suddenly closed" % [@name])
   end # def run
 end # class
 
   end # def run
 end # class