Skip to content

Commit

Permalink
Merge pull request #5381 from ichorid/fix_table_racecon
Browse files Browse the repository at this point in the history
Fix race condition in tablecontentmodel
  • Loading branch information
devos50 authored Jun 18, 2020
2 parents 1594c6c + a940974 commit c28d324
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tribler-gui/tribler_gui/widgets/tablecontentmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,8 @@ def on_query_results(self, response, remote=False, on_top=False):
self.info_changed.emit(response['results'])
elif remote and uuid.UUID(response.get('uuid')) == CHANNELS_VIEW_UUID:
# This is a discovered channel (from a remote peer), update the total number of channels and the labels
self.channel_info["total"] += len(response["results"])
if self.channel_info.get("total"):
self.channel_info["total"] += len(response["results"])
self.info_changed.emit(response['results'])
return True

Expand Down

0 comments on commit c28d324

Please sign in to comment.