~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/medium.py

  • Committer: Andrew Bennetts
  • Date: 2007-12-19 02:25:26 UTC
  • mto: This revision was merged to the branch mainline in revision 3127.
  • Revision ID: andrew.bennetts@canonical.com-20071219022526-pnpspp8dgbzso15n
(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()."""