diff --git a/legendary/__init__.py b/legendary/__init__.py index eab1ff5..baebb4b 100644 --- a/legendary/__init__.py +++ b/legendary/__init__.py @@ -1,3 +1,3 @@ """Legendary!""" -__version__ = '0.0.1' +__version__ = '0.0.2' diff --git a/legendary/core.py b/legendary/core.py index 593a85e..0c708c0 100644 --- a/legendary/core.py +++ b/legendary/core.py @@ -98,7 +98,7 @@ class LegendaryCore: td = dt_now - dt_old # if session still has at least 10 minutes left we can re-use it. - if td.total_seconds() < (self.lgd.userdata['expires_in'] - 600): + if dt_old > dt_now and td.total_seconds() < (self.lgd.userdata['expires_in'] - 600): self.log.debug('Reusing existing login session...') self.egs.resume_session(self.lgd.userdata) return True