mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert "Revert "Reset primary_server when remove_server"" [ci skip]
This reverts commit d2671c96f32e6fbbd39162a2c9042dcaf3bf2d68. previous reverting is commit miss git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
19931ae1a0
commit
eab51f71d6
1 changed files with 5 additions and 0 deletions
|
@ -1866,6 +1866,11 @@ module DRb
|
||||||
# Removes +server+ from the list of registered servers.
|
# Removes +server+ from the list of registered servers.
|
||||||
def remove_server(server)
|
def remove_server(server)
|
||||||
@server.delete(server.uri)
|
@server.delete(server.uri)
|
||||||
|
mutex.synchronize do
|
||||||
|
if @primary_server == server
|
||||||
|
@primary_server = nil
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
module_function :remove_server
|
module_function :remove_server
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue