summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-16 14:58:25 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-16 14:58:25 +0000
commit482abfc851b86fa70482e70c828c56453677c58f (patch)
tree9c2fa02cf69cab5203ec93ac3d4b2cb5fcd16095
parent1fdf66ad676cdeebf0b9a2e24d828c8643475ee0 (diff)
* test/openssl/ssl_server.rb: get rid of race condition.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--test/openssl/ssl_server.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/openssl/ssl_server.rb b/test/openssl/ssl_server.rb
index 5e1303379f7..556c28b84c9 100644
--- a/test/openssl/ssl_server.rb
+++ b/test/openssl/ssl_server.rb
@@ -64,8 +64,7 @@ $stdout.puts Process.pid
$stdout.puts port
loop do
- ssl = ssls.accept
- Thread.start{
+ Thread.start(ssls.accept) {|ssl|
q = Queue.new
th = Thread.start{ ssl.write(q.shift) while true }
while line = ssl.gets