From f898efd8a8e6e2331f63358a242759b69ddf5a54 Mon Sep 17 00:00:00 2001 From: naruse Date: Sun, 1 Apr 2012 18:36:46 +0000 Subject: [PATCH] * lib/webrick/server.rb (WEBrick::GenericServer): close socket only if the socket is not closed yet. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 +++++ lib/webrick/server.rb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index c23b2df3a2..845eb852b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Apr 2 03:35:25 2012 NARUSE, Yui + + * lib/webrick/server.rb (WEBrick::GenericServer): close socket only if + the socket is not closed yet. + Sun Apr 1 23:03:18 2012 NARUSE, Yui * lib/net/ftp.rb (Net::BufferedSocket): should delegate send() to @io diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb index 30f4dc3143..c6d1e4f0f9 100644 --- a/lib/webrick/server.rb +++ b/lib/webrick/server.rb @@ -204,7 +204,7 @@ module WEBrick else @logger.debug "close:
" end - sock.close + sock.close unless sock.closed? end } end