~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/medium.py

  • Committer: Andrew Bennetts
  • Date: 2009-01-07 00:58:30 UTC
  • mto: This revision was merged to the branch mainline in revision 3935.
  • Revision ID: andrew.bennetts@canonical.com-20090107005830-ua1dmtrnyl37acf4
Quick attempt at adding some EINTR-proofing to smart protocol code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
274
274
    def _read_bytes(self, desired_count):
275
275
        # We ignore the desired_count because on sockets it's more efficient to
276
276
        # read large chunks (of _MAX_READ_SIZE bytes) at a time.
277
 
        return self.socket.recv(_MAX_READ_SIZE)
 
277
        return osutils.until_no_eintr(self.socket.recv, _MAX_READ_SIZE)
278
278
 
279
279
    def terminate_due_to_error(self):
280
280
        # TODO: This should log to a server log file, but no such thing