Skip to content
This repository was archived by the owner on Aug 16, 2024. It is now read-only.

Commit ee974d7

Browse files
authored
Merge pull request #52 from cpainchaud/main
bugfix: reopen http session if it was closed
2 parents 6f53235 + ad35fb0 commit ee974d7

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

reolink/camera_api.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,11 @@ def is_nvr(self):
10561056

10571057
async def send(self, body, param=None, expected_content_type: Optional[str] = None):
10581058
"""Generic send method."""
1059+
1060+
if self._aiohttp_session.closed:
1061+
self._aiohttp_session = aiohttp.ClientSession(timeout=self._timeout,
1062+
connector=aiohttp.TCPConnector(verify_ssl=False))
1063+
10591064
if body is None or (body[0]["cmd"] != "Login" and body[0]["cmd"] != "Logout"):
10601065
if not await self.login():
10611066
return False

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
setup(
44
name='reolink',
55
packages=['reolink'],
6-
version='0.0.30',
6+
version='0.0.31',
77
license='MIT',
88
description='Reolink camera package',
99
author='fwestenberg',

0 commit comments

Comments
 (0)