aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/src')
-rw-r--r--packages/meshbay-node/src/meshbay_node/hub_client.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/hub_client.py b/packages/meshbay-node/src/meshbay_node/hub_client.py
index 8873958..ef12bb4 100644
--- a/packages/meshbay-node/src/meshbay_node/hub_client.py
+++ b/packages/meshbay-node/src/meshbay_node/hub_client.py
@@ -319,9 +319,15 @@ class HubClient:
"token": self._session.access_token,
"node_id": self._session.node_id,
}
+ # `if gids:` here, and the hub read a missing key as "claims
+ # every group this account belongs to" — so a node hosting
+ # nothing advertised itself for all of them and swallowed
+ # their traffic. The hub no longer widens an absent claim,
+ # and this says the empty set out loud rather than by
+ # omission: hosting nothing is a fact, not a missing field.
gids = group_ids() if callable(group_ids) else group_ids
- if gids:
- auth_msg["group_ids"] = gids
+ if gids is not None:
+ auth_msg["group_ids"] = list(gids)
await ws.send(json.dumps(auth_msg))
# Bounded: a hub that accepts the socket and then says nothing
# — which is what it does for a few seconds while restarting —