ping is a property

This commit is contained in:
callebtc
2023-02-01 15:21:22 +01:00
parent 0c9dcc7070
commit f9e1a53609

View File

@@ -64,6 +64,7 @@ class Relay:
time.sleep(1)
self.connect(self.ssl_options)
@property
def ping(self):
if self.connected:
return int(self.ws.last_ping_tm - self.ws.last_pong_tm)