Skip to content

Commit

Permalink
Merge pull request #3 from d70-t/large_connection_pool
Browse files Browse the repository at this point in the history
increase connection pool size to 100
  • Loading branch information
d70-t committed Apr 6, 2021
2 parents f81f544 + e41b5b1 commit ac7ac2c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ipfsspec/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ def __init__(self, url):
self.backoff_time = 0
self.next_request_time = time.monotonic()
self.session = requests.Session()
adapter = requests.adapters.HTTPAdapter(pool_connections=100, pool_maxsize=100)
self.session.mount('http://', adapter)
self.session.mount('https://', adapter)

def get(self, path):
try:
Expand Down

0 comments on commit ac7ac2c

Please sign in to comment.