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

Commit 52eb5f3

Browse files
committed
Add timeout for http connection
1 parent 9f950ed commit 52eb5f3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

orbitdbapi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.2.0.rc.1.3'
1+
__version__ = '0.2.0.rc.1.4'

orbitdbapi/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ def __init__ (self, **kwargs):
1111
self.__config = kwargs
1212
self.__base_url = self.__config.get('base_url')
1313
self.__use_db_cache = self.__config.get('use_db_cache', True)
14+
1415
self.__session = requests.Session()
15-
self.__session.mount(self.__base_url, HTTP20Adapter())
16+
self.__session.mount(self.__base_url, HTTP20Adapter(timeout=self.__config.get('timeout', 30)))
1617

1718
@property
1819
def use_db_cache(self):

0 commit comments

Comments
 (0)