Only require a ServerStatistics message when forwarding in ImageCallback
We were waiting for a ServerStatistics message when not forwarding.
But, there was/will never be one because it wasn't logged. We aren't
going to use the data anyways, so just ignore it.
Change-Id: Ic1ce1a34d68fccb27a266149251fad0d024463bf
Signed-off-by: Austin Schuh <austin.linux@gmail.com>
diff --git a/y2020/vision/charuco_lib.cc b/y2020/vision/charuco_lib.cc
index 77e1ba9..856c560 100644
--- a/y2020/vision/charuco_lib.cc
+++ b/y2020/vision/charuco_lib.cc
@@ -102,13 +102,13 @@
const monotonic_clock::time_point eof_source_node =
monotonic_clock::time_point(
chrono::nanoseconds(image.monotonic_timestamp_ns()));
- server_fetcher_.Fetch();
- if (!server_fetcher_.get()) {
- return;
- }
-
chrono::nanoseconds offset{0};
if (source_node_ != event_loop_->node()) {
+ server_fetcher_.Fetch();
+ if (!server_fetcher_.get()) {
+ return;
+ }
+
// If we are viewing this image from another node, convert to our
// monotonic clock.
const aos::message_bridge::ServerConnection *server_connection = nullptr;