Instead of reloading only TRID, reconnect to entire stream when waiting for 2+ seconds.

This commit is contained in:
Thulinma 2016-05-25 16:39:46 +02:00
parent 070b4d7866
commit 4aa4335354

View file

@ -1044,9 +1044,8 @@ namespace Mist {
if (myMeta.live && currKeyOpen.count(nxt.tid) && (currKeyOpen[nxt.tid] == (unsigned int)nextPage || nextPage == -1)){
if (myMeta && ++emptyCount < 100){
//we're waiting for new data. Simply retry.
if (emptyCount % 4 == 0){
//every second, reload the metaPage.
nProxy.metaPages.erase(nxt.tid);
if (emptyCount % 8 == 0){
reconnect();//reconnect every 2 seconds
}
buffer.insert(nxt);
}else{