message_bridge_server_lib: stream ids must match despite errors
It's arguable whether we should accept config mismatches.
However, if we're going to allow it, we should at least make
it work.
Only incrementing the channel_count for matching channels breaks
the stream->channel mapping from the clients perspective, since
channel_count is used as the stream id.
Change-Id: Ie9d24c81e925528510c8bbb665d3c6f9a71c86d6
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/network/message_bridge_server_lib.cc b/aos/network/message_bridge_server_lib.cc
index e8e0261..7c0e468 100644
--- a/aos/network/message_bridge_server_lib.cc
+++ b/aos/network/message_bridge_server_lib.cc
@@ -487,9 +487,8 @@
if (!matched) {
LOG(ERROR) << "Remote tried registering for unknown channel "
<< FlatbufferToJson(channel);
- } else {
- ++channel_index;
}
+ ++channel_index;
}
// TODO(sarah.newman): what if node_index is -1?
server_status_.ResetFilter(node_index);