~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/medium.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-12-19 03:39:18 UTC
  • mfrom: (3118.2.2 sendall-limit)
  • Revision ID: pqm@pqm.ubuntu.com-20071219033918-4r7sd1wllfw5oyf2
(andrew) Fix #115781 by passing no more than 64k at a time to
        socket.sendall.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
from bzrlib import (
32
32
    errors,
 
33
    osutils,
33
34
    symbol_versioning,
34
35
    )
35
36
from bzrlib.smart.protocol import (
177
178
        self.finished = True
178
179
 
179
180
    def _write_out(self, bytes):
180
 
        self.socket.sendall(bytes)
 
181
        osutils.send_all(self.socket, bytes)
181
182
 
182
183
 
183
184
class SmartServerPipeStreamMedium(SmartServerStreamMedium):
524
525
    def _accept_bytes(self, bytes):
525
526
        """See SmartClientMedium.accept_bytes."""
526
527
        self._ensure_connection()
527
 
        self._socket.sendall(bytes)
 
528
        osutils.send_all(self._socket, bytes)
528
529
 
529
530
    def disconnect(self):
530
531
        """See SmartClientMedium.disconnect()."""