forked from LBRYCommunity/lbry-sdk
fix handling stream with no data blobs
fixes https://github.com/lbryio/lbry/issues/905
This commit is contained in:
parent
7a020bec05
commit
6385ab27c1
1 changed files with 6 additions and 4 deletions
|
@ -179,8 +179,12 @@ class ConnectionManager(object):
|
|||
|
||||
# find peers for the head blob if configured to do so
|
||||
if self.seek_head_blob_first:
|
||||
peers = yield request_creator.get_new_peers_for_head_blob()
|
||||
peers = self.return_shuffled_peers_not_connected_to(peers, new_conns_needed)
|
||||
try:
|
||||
peers = yield request_creator.get_new_peers_for_head_blob()
|
||||
peers = self.return_shuffled_peers_not_connected_to(peers, new_conns_needed)
|
||||
except KeyError:
|
||||
log.warning("%s does not have a head blob", self._get_log_name())
|
||||
peers = []
|
||||
else:
|
||||
peers = []
|
||||
|
||||
|
@ -196,10 +200,8 @@ class ConnectionManager(object):
|
|||
self._get_log_name(), self._peer_connections.keys())
|
||||
log.debug("%s List of connection states: %s", self._get_log_name(),
|
||||
[p_c_h.connection.state for p_c_h in self._peer_connections.values()])
|
||||
|
||||
defer.returnValue(peers)
|
||||
|
||||
|
||||
def _connect_to_peer(self, peer):
|
||||
if self.stopped:
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue