mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Do not close non sock
This commit is contained in:
parent
7e3a5b10f1
commit
077c253954
1 changed files with 8 additions and 7 deletions
|
@ -635,7 +635,7 @@ class AsyncReqMessageClient:
|
|||
|
||||
self._closing = False
|
||||
|
||||
def connect(self):
|
||||
async def connect(self):
|
||||
# wire up sockets
|
||||
self._init_socket()
|
||||
|
||||
|
@ -979,10 +979,11 @@ class PublishServer(salt.transport.base.DaemonizedPublishServer):
|
|||
Disconnect an existing publisher socket and remove it from the local
|
||||
thread's cache.
|
||||
"""
|
||||
sock = self.sock
|
||||
self.sock = None
|
||||
log.error("Socket close %r", self)
|
||||
sock.close()
|
||||
if self.sock is not None:
|
||||
sock = self.sock
|
||||
self.sock = None
|
||||
log.error("Socket close %r", self)
|
||||
sock.close()
|
||||
log.error("Socket closed %r", self)
|
||||
if self.ctx and self.ctx.closed is False:
|
||||
ctx = self.ctx
|
||||
|
@ -1035,8 +1036,8 @@ class RequestClient(salt.transport.base.RequestClient):
|
|||
io_loop=io_loop,
|
||||
)
|
||||
|
||||
def connect(self):
|
||||
self.message_client.connect()
|
||||
async def connect(self):
|
||||
await self.message_client.connect()
|
||||
|
||||
async def send(self, load, timeout=60):
|
||||
self.connect()
|
||||
|
|
Loading…
Add table
Reference in a new issue