diff --git a/mitogen/core.py b/mitogen/core.py index 08cbafc2..1d7f55b5 100644 --- a/mitogen/core.py +++ b/mitogen/core.py @@ -782,7 +782,7 @@ class Stream(BasicStream): self.on_disconnect(broker) return elif written != len(buf): - self._output_buf.appendleft(buf[written:]) + self._output_buf.appendleft(buffer(buf, written)) _vv and IOLOG.debug('%r.on_transmit() -> len %d', self, written)