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 wrap: on
line diff
--- a/viff/runtime.py	Mon Jul 29 13:45:37 2013 +0100
+++ b/viff/runtime.py	Thu May 01 16:09:09 2014 +0100
@@ -299,6 +299,9 @@
         a data part. The data is passed the appropriate Deferred in
         :class:`self.incoming_data`.
         """
+        # needed to make VIFF reactor work with later versions of Twisted
+        if 'recvd' not in self.__dict__:
+            self.recvd = self._unprocessed[self._compatibilityOffset:]
         if self.peer_id is None:
             # TODO: Handle ValueError if the string cannot be decoded.
             self.peer_id = int(string)