From 4eb10b56c1c80ed04ac3e85f0c2f3a0cdb72cb42 Mon Sep 17 00:00:00 2001 From: Job Evers-Meltzer Date: Fri, 30 Dec 2016 01:40:06 -0600 Subject: [PATCH] small changes --- lbrynet/core/client/ClientProtocol.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lbrynet/core/client/ClientProtocol.py b/lbrynet/core/client/ClientProtocol.py index 2d9e3d0f5..f95162cf3 100644 --- a/lbrynet/core/client/ClientProtocol.py +++ b/lbrynet/core/client/ClientProtocol.py @@ -176,11 +176,12 @@ class ClientProtocol(Protocol): def _handle_response(self, response): ds = [] - log.debug("Handling a response. Current expected responses: %s", self._response_deferreds) + log.debug( + "Handling a response from %s. Expected responses: %s. Actual responses: %s", + self.peer, self._response_deferreds.keys(), response.keys()) for key, val in response.items(): if key in self._response_deferreds: - d = self._response_deferreds[key] - del self._response_deferreds[key] + d = self._response_deferreds.pop(key) d.callback({key: val}) ds.append(d) for k, d in self._response_deferreds.items(): @@ -194,6 +195,7 @@ class ClientProtocol(Protocol): d.addErrback(self._handle_response_error) ds.append(d) + # TODO: are we sure we want to consume errors here dl = defer.DeferredList(ds, consumeErrors=True) def get_next_request(results):