From 16eab36418623d95e4c8f0085272f4d09d373731 Mon Sep 17 00:00:00 2001 From: Mikko Ohtamaa Date: Thu, 22 Sep 2016 22:15:57 +0300 Subject: [PATCH] Update KeepAliveRPCProvider arguments, documentation. --- web3/providers/rpc.py | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/web3/providers/rpc.py b/web3/providers/rpc.py index 9ed4ec6547..a198f229b6 100644 --- a/web3/providers/rpc.py +++ b/web3/providers/rpc.py @@ -77,15 +77,7 @@ def make_request(self, method, params): class KeepAliveRPCProvider(BaseProvider): """RPC-provider that handles HTTP keep-alive connection correctly. -<<<<<<< HEAD - HTTP client and underlying TCP/IP network connection is recycled across requests. - :class:`HTTPClient` connection pooling is used for connections. - - Preferably create only one instance of KeepAliveProvider per process, - though the class has internal in-process cache for clients. -======= HTTP client is recycled across requests. Create only one instance of KeepAliveProvider per process. ->>>>>>> Add KeepAlive RPC provider. """ #: In-process client cache keyed by host:port -> HTTPClient @@ -171,7 +163,7 @@ def get_or_create_client(self): }, ) - self.clients[key] = client + KeepAliveRPCProvider.clients[key] = client return client def __str__(self): @@ -182,10 +174,8 @@ def __repr__(self): def make_request(self, method, params): request_data = self.encode_rpc_request(method, params) - response = self.client.post(self.path, body=request_data) response_body = response.read() - return response_body