Hiroyuki Komatsu
komat****@users*****
2005年 1月 16日 (日) 04:50:20 JST
Index: prime/lib/server.rb diff -u prime/lib/server.rb:1.2 prime/lib/server.rb:1.3 --- prime/lib/server.rb:1.2 Fri Mar 26 02:19:49 2004 +++ prime/lib/server.rb Sun Jan 16 04:50:20 2005 @@ -1,5 +1,5 @@ # server.rb -# $Id: server.rb,v 1.2 2004/03/25 17:19:49 komatsu Exp $ +# $Id: server.rb,v 1.3 2005/01/15 19:50:20 komatsu Exp $ # # Copyright (C) 2001 Satoru Takabayashi <sator****@namaz*****> # Copyright (C) 2004 Hiroyuki Komatsu <komat****@taiya*****> @@ -22,6 +22,9 @@ def session_loop (io_in, io_out) loop { line =****@sessi*****_line(io_in) + if line.nil? then + return # The connection has been closed. + end logging(line) Mutex.new.synchronize { result =****@sessi*****(line) @@ -44,6 +47,8 @@ @debug_io.chmod(0600) if @debug_io::stat.owned? end + ## This method writes Line to @debug_io, if the debug mode is on. + ## This doesn't return any value. def logging (line) if @debug then line.chomp()