Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,13 @@ def _get_next_outgoing_channel(self) -> int:

def _outgoing_empty(self) -> None:
"""Send an empty frame to prevent the connection from reaching an idle timeout."""
if self._network_trace:
_LOGGER.debug("-> EmptyFrame()", extra=self._network_trace_params)
if self._error:
raise self._error

try:
if self._can_write():
if self._network_trace:
_LOGGER.debug("-> EmptyFrame()", extra=self._network_trace_params)
self._transport.write(EMPTY_FRAME)
self._last_frame_sent_time = time.time()
except (OSError, IOError, SSLError, socket.error) as exc:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@ async def _keep_alive_async(self):
current_time = time.time()
elapsed_time = current_time - start_time
if elapsed_time >= self._keep_alive_interval:
_logger.debug(
"Keeping %r connection alive.",
self.__class__.__name__,
extra=self._network_trace_params
)
await asyncio.shield(self._connection.listen(wait=self._socket_timeout,
batch=self._link.current_link_credit))
start_time = current_time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,13 @@ def _get_next_outgoing_channel(self) -> int:

async def _outgoing_empty(self) -> None:
"""Send an empty frame to prevent the connection from reaching an idle timeout."""
if self._network_trace:
_LOGGER.debug("-> EmptyFrame()", extra=self._network_trace_params)

if self._error:
raise self._error

try:
if self._can_write():
if self._network_trace:
_LOGGER.debug("-> EmptyFrame()", extra=self._network_trace_params)
await self._transport.write(EMPTY_FRAME)
self._last_frame_sent_time = time.time()
except (OSError, IOError, SSLError, socket.error) as exc:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ def _keep_alive(self):
current_time = time.time()
elapsed_time = current_time - start_time
if elapsed_time >= self._keep_alive_interval:
_logger.debug("Keeping %r connection alive.", self.__class__.__name__)
self._connection.listen(wait=self._socket_timeout, batch=self._link.current_link_credit)
start_time = current_time
time.sleep(1)
Expand Down