in uamqp/client.py [0:0]
def _keep_alive(self):
start_time = self._counter.get_current_ms()
try:
while self._connection and not self._shutdown:
current_time = self._counter.get_current_ms()
elapsed_time = (current_time - start_time)/1000
if elapsed_time >= self._keep_alive_interval:
_logger.debug("Keeping %r connection alive.", self.__class__.__name__)
self._connection.work()
start_time = current_time
time.sleep(1)
except Exception as e: # pylint: disable=broad-except
_logger.info("Connection keep-alive for %r failed: %r.", self.__class__.__name__, e)