Add `requests` session close method.

This commit is contained in:
Andrei 2019-05-02 15:56:19 +03:00
parent 55b4e866db
commit 0cdb7c7969
1 changed files with 2 additions and 0 deletions

View File

@ -23,9 +23,11 @@ def get_sync_result(result_payload: dict, sleep_time: int):
time.sleep(sleep_time)
else:
captcha_response.update({"taskId": result_payload["taskId"]})
session.close()
return captcha_response
else:
captcha_response.update({"taskId": result_payload["taskId"]})
session.close()
return captcha_response