def close(self):
        # We have to drain the socket to make sure that we don't get
        # weird responses when some other request comes after a
        # failed/prematurely-terminated one.
        try:
            while self.next():
                pass
        except __HOLE__:
            pass
        self.resource.release()
dataset/ETHPy150Open basho/riak-python-client/riak/transports/tcp/stream.py/PbufStream.close