diff options
author | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-14 23:48:29 +0200 |
---|---|---|
committer | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-14 23:48:29 +0200 |
commit | ebb7d4799f00c6ebb2cb1f53dcce4e1b1cc884f3 (patch) | |
tree | 74212e573c5888b42ed3016afc3ad5da74ff8d8a | |
parent | 2ce4b4e99cd139ff1ce2976c317218beaa5a16c6 (diff) | |
download | pyParrotZikTCP-ebb7d4799f00c6ebb2cb1f53dcce4e1b1cc884f3.tar.xz pyParrotZikTCP-ebb7d4799f00c6ebb2cb1f53dcce4e1b1cc884f3.zip |
Fix notifications responses colliding with request response..
-rw-r--r-- | resource_manager.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/resource_manager.py b/resource_manager.py index 8aa4fb8..8dcf6bc 100644 --- a/resource_manager.py +++ b/resource_manager.py @@ -54,12 +54,15 @@ class ResourceManagerBase(object): def get_answer(self): data = self.receive_message() + notifications = [] while not data.answer: if data.notify: - self.handle_notification(data.notify) + notifications.append(data.notify) else: raise AssertionError('Unknown response') data = self.receive_message() + for notification in notifications: + self.handle_notification(notification) return data.answer def handle_notification(self, notification): |