Skip to content

Commit

Permalink
Update KeepAliveRPCProvider arguments, documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama authored and pipermerriam committed Oct 24, 2016
1 parent 25dc132 commit 16eab36
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions web3/providers/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -171,7 +163,7 @@ def get_or_create_client(self):
},
)

self.clients[key] = client
KeepAliveRPCProvider.clients[key] = client
return client

def __str__(self):
Expand All @@ -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


Expand Down

0 comments on commit 16eab36

Please sign in to comment.