Skip to content

Commit

Permalink
Merge pull request vnpy#3520 from noranhe/fix-issue-3492
Browse files Browse the repository at this point in the history
[Fix] issue 3492
  • Loading branch information
vnpy authored Mar 22, 2024
2 parents e90e0f8 + c9f0882 commit 3f908c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vnpy/rpc/client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import threading
from datetime import datetime
from time import time
from functools import lru_cache
from typing import Any

Expand Down Expand Up @@ -50,7 +50,7 @@ def __init__(self) -> None:
self._thread: threading.Thread = None # RpcClient thread
self._lock: threading.Lock = threading.Lock()

self._last_received_ping: datetime = datetime.utcnow()
self._last_received_ping: time = time()

@lru_cache(100)
def __getattr__(self, name: str) -> Any:
Expand Down Expand Up @@ -111,7 +111,7 @@ def start(
self._thread = threading.Thread(target=self.run)
self._thread.start()

self._last_received_ping = datetime.utcnow()
self._last_received_ping = time()

def stop(self) -> None:
"""
Expand Down

0 comments on commit 3f908c6

Please sign in to comment.