Skip to content

Commit 71ea1ef

Browse files
committed
Fix session
1 parent 16fed4f commit 71ea1ef

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/superannotate/lib/infrastructure/services.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@ def __init__(self, api_url: str, auth_token: str, logger, paginate_by=None):
3232
self.logger = logger
3333
self._paginate_by = paginate_by
3434
self.team_id = auth_token.split("=")[-1]
35-
self._session = None
3635

3736
@timed_lru_cache(seconds=360)
3837
def get_session(self):
39-
if not self._session:
40-
self._session = requests.Session()
41-
self._session.headers.update(self.default_headers)
42-
return self._session
38+
session = requests.Session()
39+
session.headers.update(self.default_headers)
40+
return session
4341

4442
@property
4543
def default_headers(self):

0 commit comments

Comments
 (0)