Don't use Thread#kill

This commit is contained in:
Kyle Banker 2011-11-07 13:59:52 -05:00
parent fbdf16bd48
commit 540a58fed6
1 changed files with 1 additions and 2 deletions

View File

@ -266,7 +266,6 @@ module Mongo
@connected = false
if @refresh_thread
@refresh_thread.kill
@refresh_thread = nil
end
@ -569,7 +568,7 @@ module Mongo
if @refresh_mode == :async
return if @refresh_thread && @refresh_thread.alive?
@refresh_thread = Thread.new do
while true do
while true && @connected do
sleep(@refresh_interval)
refresh
end