mirror of
https://codeberg.org/prof_x_pvt_ltd/captive.whump.shanti-portal
synced 2024-08-14 22:46:42 +00:00
take expire_hours from arguments
This commit is contained in:
parent
bec77b9d92
commit
d2b027e817
1 changed files with 3 additions and 1 deletions
|
@ -22,10 +22,12 @@ class Client(object):
|
|||
self.ip_address = kw.pop('ip_address', '127.0.0.1')
|
||||
self.protocol = kw.pop('protocol', 'tcp')
|
||||
|
||||
expire_hours = kw.pop('expire_hours', 24)
|
||||
|
||||
self._enabled = False
|
||||
self._last_packets = 0
|
||||
self._last_activity = None
|
||||
self._expires = datetime.now() + timedelta(days=1)
|
||||
self._expires = datetime.now() + timedelta(hours=expire_hours)
|
||||
|
||||
self._new = False
|
||||
self._commit = False
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue