Fix web_proxy for multinode.
Make sure the channel is readable on a node before making fetchers.
Web side will silently fail to subscribe if it isn't available.
Change-Id: Ic3e2c3cf49fb6750697ce6bd7ccf172558eebf2d
diff --git a/aos/network/web_proxy.cc b/aos/network/web_proxy.cc
index 77371eb..f4a8ce8 100644
--- a/aos/network/web_proxy.cc
+++ b/aos/network/web_proxy.cc
@@ -212,6 +212,10 @@
const message_bridge::Connect *message =
flatbuffers::GetRoot<message_bridge::Connect>(buffer.data.data());
for (auto &subscriber : subscribers_) {
+ // Make sure the subscriber is for a channel on this node.
+ if (subscriber.get() == nullptr) {
+ continue;
+ }
bool found_match = false;
for (auto channel : *message->channels_to_transfer()) {
if (subscriber->Compare(channel)) {