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
|
# find peers for the head blob if configured to do so
|
||||||
if self.seek_head_blob_first:
|
if self.seek_head_blob_first:
|
||||||
peers = yield request_creator.get_new_peers_for_head_blob()
|
try:
|
||||||
peers = self.return_shuffled_peers_not_connected_to(peers, new_conns_needed)
|
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:
|
else:
|
||||||
peers = []
|
peers = []
|
||||||
|
|
||||||
|
@ -196,10 +200,8 @@ class ConnectionManager(object):
|
||||||
self._get_log_name(), self._peer_connections.keys())
|
self._get_log_name(), self._peer_connections.keys())
|
||||||
log.debug("%s List of connection states: %s", self._get_log_name(),
|
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()])
|
[p_c_h.connection.state for p_c_h in self._peer_connections.values()])
|
||||||
|
|
||||||
defer.returnValue(peers)
|
defer.returnValue(peers)
|
||||||
|
|
||||||
|
|
||||||
def _connect_to_peer(self, peer):
|
def _connect_to_peer(self, peer):
|
||||||
if self.stopped:
|
if self.stopped:
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue