@@ -192,8 +192,8 @@ bool WebVideoServer::handle_stream(const async_web_server_cpp::HttpRequest &requ
192192 bool did_find_compressed_topic = false ;
193193 for (auto topic_and_types : tnat) {
194194 if (topic_and_types.second .size () > 1 ) {
195- // explicitly avoid topics with more than one type
196- break ;
195+ // skip over topics with more than one type
196+ continue ;
197197 }
198198 auto & topic_name = topic_and_types.first ;
199199 if (topic_name == compressed_topic_name || (topic_name.find (" /" ) == 0 && topic_name.substr (1 ) == compressed_topic_name)){
@@ -249,8 +249,8 @@ bool WebVideoServer::handle_stream_viewer(const async_web_server_cpp::HttpReques
249249 bool did_find_compressed_topic = false ;
250250 for (auto topic_and_types : tnat) {
251251 if (topic_and_types.second .size () > 1 ) {
252- // explicitly avoid topics with more than one type
253- break ;
252+ // skip over topics with more than one type
253+ continue ;
254254 }
255255 auto & topic_name = topic_and_types.first ;
256256 if (topic_name == compressed_topic_name || (topic_name.find (" /" ) == 0 && topic_name.substr (1 ) == compressed_topic_name)){
@@ -292,8 +292,8 @@ bool WebVideoServer::handle_list_streams(const async_web_server_cpp::HttpRequest
292292 auto tnat = nh_->get_topic_names_and_types ();
293293 for (auto topic_and_types : tnat) {
294294 if (topic_and_types.second .size () > 1 ) {
295- // explicitly avoid topics with more than one type
296- break ;
295+ // skip over topics with more than one type
296+ continue ;
297297 }
298298 auto & topic_name = topic_and_types.first ;
299299 auto & topic_type = topic_and_types.second [0 ]; // explicitly take the first
0 commit comments