OSDN Git Service

* [shogi-server] - shogi-server: any bind addresses, ruby attempts to listen on both...
authorDaigo Moriwaki <daigo@debian.org>
Sun, 24 Nov 2013 09:20:10 +0000 (18:20 +0900)
committerDaigo Moriwaki <daigo@debian.org>
Sun, 24 Nov 2013 09:20:10 +0000 (18:20 +0900)
Specifying "::" on Linux leads to listen on both IPv4 and IPv6, which
results in a warning message saying "Address already in use - bind(2)".

changelog
shogi-server

index a807b11..e6e4e42 100644 (file)
--- a/changelog
+++ b/changelog
@@ -3,8 +3,14 @@
        * [shogi-server]
          - shogi_server/league/floodgate.rb: Improved robustness against
            empty file under ruby 1.9.3p194
        * [shogi-server]
          - shogi_server/league/floodgate.rb: Improved robustness against
            empty file under ruby 1.9.3p194
-         - shogi-server: Previously, reloading in daemon mode failed on
-           ruby 1.9.3p194. This issue has been fixed.
+         - shogi-server:
+           - Previously, reloading in daemon mode failed on
+             ruby 1.9.3p194. This issue has been fixed.
+           - Listen on only IPv4 explicitly. Under ruby 1.9.3p194, without
+             any bind addresses, ruby attempts to listen on both "0.0.0.0"
+             and "::". Specifying "::" on Linux leads to listen on both IPv4
+             and IPv6, which results in a warning message saying "Address
+             already in use - bind(2)".
        * [mk_game_results]
          - Fixed for reading Japanese comments under ruby1.9.3p194.
 
        * [mk_game_results]
          - Fixed for reading Japanese comments under ruby1.9.3p194.
 
index c0f64f8..c20dba8 100755 (executable)
@@ -372,6 +372,7 @@ def main
   $league.dir = $topdir
 
   config = {}
   $league.dir = $topdir
 
   config = {}
+  config[:BindAddress] = "0.0.0.0"
   config[:Port]       = port
   config[:ServerType] = WEBrick::Daemon if $options["daemon"]
   config[:Logger]     = $logger
   config[:Port]       = port
   config[:ServerType] = WEBrick::Daemon if $options["daemon"]
   config[:Logger]     = $logger