summaryrefslogtreecommitdiff
path: root/lib/webrick/server.rb
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-01 18:36:46 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-04-01 18:36:46 +0000
commitf898efd8a8e6e2331f63358a242759b69ddf5a54 (patch)
tree0b9e2f3560393bea9984ebeee5fad1c6b1971d14 /lib/webrick/server.rb
parent4179e0b5c692f19a5b6559665b905b9457d38424 (diff)
* 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
Diffstat (limited to 'lib/webrick/server.rb')
-rw-r--r--lib/webrick/server.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb
index 30f4dc3..c6d1e4f 100644
--- a/lib/webrick/server.rb
+++ b/lib/webrick/server.rb
@@ -204,7 +204,7 @@ module WEBrick
else
@logger.debug "close: <address unknown>"
end
- sock.close
+ sock.close unless sock.closed?
end
}
end