Skip to content

Commit ee63a80

Browse files
committed
set last_usage in AsyncConnection
1 parent c3c0450 commit ee63a80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

firebirdsql/aio/fbcore.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,7 @@ async def _async_op_fetch_response(self, stmt_handle, xsqlda):
790790
class AsyncConnection(ConnectionBase, WireProtocolMixin, AsyncConnectionResponseMixin):
791791
def cursor(self, factory=AsyncCursor):
792792
DEBUG_OUTPUT("AsyncConnection::cursor()")
793+
self.last_usage = self.loop.time()
793794
if self._transaction is None:
794795
self._transaction = AsyncTransaction(self, self._autocommit)
795796
self._cursors[self._transaction] = []
@@ -839,6 +840,7 @@ def __init__(self, *args, **kwargs):
839840
else:
840841
self.loop = asyncio.get_event_loop()
841842
super().__init__(*args, **kwargs)
843+
self.last_usage = self.loop.time()
842844

843845
def _initialize_socket(self):
844846
self.sock = AsyncSocketStream(self.hostname, self.port, self.loop, self.timeout, self.cloexec)

0 commit comments

Comments
 (0)