Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When launched with a file path, the viewer will now still listen for TCP connections #6951

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions crates/top/rerun/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -918,20 +918,7 @@ fn run_impl(
};

// Where do we get the data from?
let rx: Vec<Receiver<LogMsg>> = if args.url_or_paths.is_empty() {
#[cfg(feature = "server")]
{
let server_options = re_sdk_comms::ServerOptions {
max_latency_sec: parse_max_latency(args.drop_at_latency.as_ref()),
quiet: false,
};
let rx = re_sdk_comms::serve(&args.bind, args.port, server_options)?;
vec![rx]
}

#[cfg(not(feature = "server"))]
vec![]
} else {
let rx: Vec<Receiver<LogMsg>> = {
let data_sources = args
.url_or_paths
.iter()
Expand All @@ -957,10 +944,23 @@ fn run_impl(
}
}

data_sources
let mut rxs = data_sources
.into_iter()
.map(|data_source| data_source.stream(None))
.collect::<Result<Vec<_>, _>>()?
.collect::<Result<Vec<_>, _>>()?;

#[cfg(feature = "server")]
{
let server_options = re_sdk_comms::ServerOptions {
max_latency_sec: parse_max_latency(args.drop_at_latency.as_ref()),
quiet: false,
};
let tcp_listener: Receiver<LogMsg> =
re_sdk_comms::serve(&args.bind, args.port, server_options)?;
rxs.push(tcp_listener);
}

rxs
};

// Now what do we do with the data?
Expand Down
Loading