Fix #51: These last days the algorithm seems to not treat completely firstly the starting set of channels before treating discovered channels
I verified that this commit solves the issue by treating only `CHANNELS` tab of the channels in `channels.txt`.
This commit is contained in:
parent
76e41f2f7b
commit
7626c7bad1
3
main.cpp
3
main.cpp
@ -631,7 +631,8 @@ void addChannelToTreat(unsigned short threadId, string channelId)
|
||||
channelsAlreadyTreatedAndToTreatMutex.lock();
|
||||
if(channelsAlreadyTreated.find(channelId) == channelsAlreadyTreated.end() && channelsToTreatRev.find(channelId) == channelsToTreatRev.end())
|
||||
{
|
||||
unsigned int channelsToTreatIndex = channelsToTreat.end()->first + 1;
|
||||
// It is unclear to me why `channelsToTreat.end()->first + 1` doesn't work here.
|
||||
unsigned int channelsToTreatIndex = channelsToTreat.rbegin()->first + 1;
|
||||
channelsToTreat[channelsToTreatIndex] = channelId;
|
||||
channelsToTreatRev[channelId] = channelsToTreatIndex;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user