rb: Fix the timeout used for joining threads when calling shutdown(timeout) on Nonblo...
authorKevin Clark <kclark@apache.org>
Wed, 18 Jun 2008 01:20:13 +0000 (01:20 +0000)
committerKevin Clark <kclark@apache.org>
Wed, 18 Jun 2008 01:20:13 +0000 (01:20 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@669040 13f79535-47bb-0310-9956-ffa450edef68

lib/rb/lib/thrift/server/nonblockingserver.rb

index 70a58b5..f84a109 100644 (file)
@@ -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