mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Adds set_close_callback function to removes stream instance after closed from a set streams.
This commit is contained in:
parent
c3a938e994
commit
aba00805f4
@ -559,6 +559,11 @@ class IPCMessagePublisher(object):
|
||||
io_loop=self.io_loop
|
||||
)
|
||||
self.streams.add(stream)
|
||||
|
||||
def discard_after_closed():
|
||||
self.streams.discard(stream)
|
||||
|
||||
stream.set_close_callback(discard_after_closed)
|
||||
except Exception as exc:
|
||||
log.error('IPC streaming error: {0}'.format(exc))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user