mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
For IPCClient, remove entry from instance map on close
Remove the entry from the instance map so that a closed entry may not be reused. This forces this operation even if the reference count of the entry has not yet gone to zero. Signed-off-by: Sergey Kizunov <sergey.kizunov@ni.com>
This commit is contained in:
parent
82e27634a7
commit
d7e3209e13
1 changed files with 10 additions and 0 deletions
|
@ -344,6 +344,16 @@ class IPCClient(object):
|
|||
if self.stream is not None and not self.stream.closed():
|
||||
self.stream.close()
|
||||
|
||||
# Remove the entry from the instance map so
|
||||
# that a closed entry may not be reused.
|
||||
# This forces this operation even if the reference
|
||||
# count of the entry has not yet gone to zero.
|
||||
if self.io_loop in IPCClient.instance_map:
|
||||
loop_instance_map = IPCClient.instance_map[self.io_loop]
|
||||
key = str(self.socket_path)
|
||||
if key in loop_instance_map:
|
||||
del loop_instance_map[key]
|
||||
|
||||
|
||||
class IPCMessageClient(IPCClient):
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue