Revision f3aebf6f lib/rpc/client.py

b/lib/rpc/client.py
204 204

  
205 205
  def _SendMethodCall(self, data):
206 206
    # Send request and wait for response
207
    try:
207
    def send(try_no):
208
      if try_no:
209
        logging.debug("RPC peer disconnected, retrying")
208 210
      self._InitTransport()
209 211
      return self.transport.Call(data)
210
    except Exception:
211
      self._CloseTransport()
212
      raise
212
    return t.Transport.RetryOnBrokenPipe(send, lambda _: self._CloseTransport())
213 213

  
214 214
  def Close(self):
215 215
    """Close the underlying connection.

Also available in: Unified diff