Add missing check if callback exist before calling. TODO check if other callbacks in peer cache should be called.
@@ -576,6 +576,7 @@ class CalvinNetwork(object):
_log.info("Failed to get node %s info from storage", key)
if key in self._peer_cache:
self._peer_cache.pop(key)
+ if callback:
callback(status=response.CalvinResponse(response.NOT_FOUND, {'peer_node_id': key}))
return
