From: Kevin Clark Date: Wed, 18 Jun 2008 01:20:13 +0000 (+0000) Subject: rb: Fix the timeout used for joining threads when calling shutdown(timeout) on Nonblo... X-Git-Tag: 0.2.0~511 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=f0940220c89e240e3af746c96cda5fed5305bb82;p=common%2Fthrift.git rb: Fix the timeout used for joining threads when calling shutdown(timeout) on NonblockingServer git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669040 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/lib/rb/lib/thrift/server/nonblockingserver.rb b/lib/rb/lib/thrift/server/nonblockingserver.rb index 70a58b52..f84a1090 100644 --- a/lib/rb/lib/thrift/server/nonblockingserver.rb +++ b/lib/rb/lib/thrift/server/nonblockingserver.rb @@ -197,7 +197,7 @@ module Thrift start = Time.now @worker_threads.each do |t| if shutdown_timeout > 0 - timeout = Time.now - (start + shutdown_timeout) + timeout = (start + shutdown_timeout) - Time.now break if timeout <= 0 t.join(timeout) else