Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #77 from glinmac/python-client-disconnect

Handle disconnection
  • Loading branch information...
commit a95260a15ca55d3f57bd2b4e9fde650d59316870 2 parents 1b895b2 + 581d97a
@jayjwylie jayjwylie authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 clients/python/voldemort/client.py
View
4 clients/python/voldemort/client.py
@@ -239,6 +239,9 @@ def _send_request(self, connection, req_bytes):
## read a response from the connection
def _receive_response(self, connection):
size_bytes = connection.recv(4)
+ if not size_bytes:
+ raise VoldemortException('Connection closed')
+
size = struct.unpack('>i', size_bytes)[0]
bytes_read = 0
@@ -252,6 +255,7 @@ def _receive_response(self, connection):
return ''.join(data)
+
## Bootstrap cluster metadata from a list of urls of nodes in the cluster.
## The urls are tuples in the form (host, port).
## A dictionary of node_id => node is returned.

0 comments on commit a95260a

Please sign in to comment.
Something went wrong with that request. Please try again.