Skip to content

Commit

Permalink
replace more urls
Browse files Browse the repository at this point in the history
  • Loading branch information
jprochazk committed Feb 25, 2025
1 parent c44a90a commit 8c8eb24
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion crates/store/re_grpc_server/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async fn serve_impl(
let incoming =
TcpIncoming::from_listener(tcp_listener, true, None).expect("failed to init listener");

re_log::info!("Listening for gRPC connections on http://{addr}");
re_log::info!("Listening for gRPC connections on {addr}");

let cors = CorsLayer::very_permissive();
let grpc_web = tonic_web::GrpcWebLayer::new();
Expand Down
2 changes: 1 addition & 1 deletion crates/top/re_sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ pub const DEFAULT_SERVER_PORT: u16 = 9876;
///
/// This isn't used to _host_ the server, only to _connect_ to it.
pub const DEFAULT_CONNECT_URL: &str =
const_format::concatcp!("http://127.0.0.1:{DEFAULT_SERVER_PORT}");
const_format::concatcp!("rerun+http://127.0.0.1:{DEFAULT_SERVER_PORT}");

/// The default address of a Rerun TCP server which an SDK connects to.
#[deprecated(since = "0.22.0", note = "migrate to connect_grpc")]
Expand Down
9 changes: 6 additions & 3 deletions crates/top/re_sdk/src/recording_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ impl RecordingStreamBuilder {
return Ok(RecordingStream::disabled());
}

let url = format!("http://{}", opts.connect_addr());
let url = format!("rerun+http://{}", opts.connect_addr());

// NOTE: If `_RERUN_TEST_FORCE_SAVE` is set, all recording streams will write to disk no matter
// what, thus spawning a viewer is pointless (and probably not intended).
Expand Down Expand Up @@ -1724,7 +1724,7 @@ impl RecordingStream {
#[deprecated(since = "0.22.0", note = "use connect_grpc() instead")]
pub fn connect_opts(&self, addr: std::net::SocketAddr, flush_timeout: Option<Duration>) {
let _ = flush_timeout;
self.connect_grpc_opts(format!("http://{addr}"), flush_timeout)
self.connect_grpc_opts(format!("rerun+http://{addr}"), flush_timeout)
.expect("failed to connect via gRPC");
}

Expand Down Expand Up @@ -1827,7 +1827,10 @@ impl RecordingStream {

crate::spawn(opts)?;

self.connect_grpc_opts(format!("http://{}", opts.connect_addr()), flush_timeout)?;
self.connect_grpc_opts(
format!("rerun+http://{}", opts.connect_addr()),
flush_timeout,
)?;

Ok(())
}
Expand Down
3 changes: 1 addition & 2 deletions rerun_py/src/python_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,7 @@ fn connect_grpc(
return Ok(());
};

use re_sdk::external::re_grpc_server::DEFAULT_SERVER_PORT;
let url = url.unwrap_or_else(|| format!("rerun+http://127.0.0.1:{DEFAULT_SERVER_PORT}/proxy"));
let url = url.unwrap_or_else(|| re_sdk::DEFAULT_CONNECT_URL.to_owned());
let endpoint = url
.parse::<re_uri::ProxyEndpoint>()
.map_err(|err| PyRuntimeError::new_err(err.to_string()))?;
Expand Down

0 comments on commit 8c8eb24

Please sign in to comment.