Skip to content

Commit c3141af

Browse files
committed
Removed extra CBS shutdown
1 parent ab43c9a commit c3141af

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

uamqp/_async/client_async.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -232,18 +232,14 @@ async def close_async(self):
232232
if not self._session:
233233
return # already closed.
234234
else:
235-
if self._connection.cbs and not self._ext_connection:
236-
_logger.debug("Closing CBS session.")
237-
await self._auth.close_authenticator_async()
238-
self._connection.cbs = None
239-
elif not self._connection.cbs:
235+
if not self._connection.cbs:
240236
_logger.debug("Closing non-CBS session.")
241237
await self._session.destroy_async()
242238
else:
243-
_logger.debug("Not closing CBS session.")
239+
_logger.debug("CBS session pending.")
244240
self._session = None
245241
if not self._ext_connection:
246-
_logger.debug("Closing unshared connection.")
242+
_logger.debug("Closing exclusive connection.")
247243
await self._connection.destroy_async()
248244
else:
249245
_logger.debug("Shared connection remaining open.")

uamqp/client.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,18 +255,14 @@ def close(self):
255255
if not self._session:
256256
return # already closed.
257257
else:
258-
if self._connection.cbs and not self._ext_connection:
259-
_logger.debug("Closing CBS session.")
260-
self._auth.close_authenticator()
261-
self._connection.cbs = None
262-
elif not self._connection.cbs:
258+
if not self._connection.cbs:
263259
_logger.debug("Closing non-CBS session.")
264260
self._session.destroy()
265261
else:
266-
_logger.debug("Not closing CBS session.")
262+
_logger.debug("CBS session pending.")
267263
self._session = None
268264
if not self._ext_connection:
269-
_logger.debug("Closing unshared connection.")
265+
_logger.debug("Closing exclusive connection.")
270266
self._connection.destroy()
271267
else:
272268
_logger.debug("Shared connection remaining open.")

0 commit comments

Comments
 (0)