viff

changeset 1578:f912790a8a36

runtime: Fix issue with VIFF reactor and later versions of Twisted.
author Marcel Keller <m.keller@bristol.ac.uk>
date Thu, 01 May 2014 16:09:09 +0100
parents 49ddac9bf0fa
children f1d477e94d0b
files viff/runtime.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/viff/runtime.py	Mon Jul 29 13:45:37 2013 +0100
     1.2 +++ b/viff/runtime.py	Thu May 01 16:09:09 2014 +0100
     1.3 @@ -299,6 +299,9 @@
     1.4          a data part. The data is passed the appropriate Deferred in
     1.5          :class:`self.incoming_data`.
     1.6          """
     1.7 +        # needed to make VIFF reactor work with later versions of Twisted
     1.8 +        if 'recvd' not in self.__dict__:
     1.9 +            self.recvd = self._unprocessed[self._compatibilityOffset:]
    1.10          if self.peer_id is None:
    1.11              # TODO: Handle ValueError if the string cannot be decoded.
    1.12              self.peer_id = int(string)