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

fix: Improve debug messages in zenoh-transport #1090

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions io/zenoh-transport/src/multicast/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ impl TransportLinkMulticastUniversal {
)
.await;
if let Err(e) = res {
tracing::debug!("{}", e);
tracing::debug!("TX task failed: {}", e);
// Spawn a task to avoid a deadlock waiting for this same task
// to finish in the close() joining its handle
zenoh_runtime::ZRuntime::Net.spawn(async move { c_transport.delete().await });
Expand Down Expand Up @@ -378,7 +378,7 @@ impl TransportLinkMulticastUniversal {
.await;
c_signal.trigger();
if let Err(e) = res {
tracing::debug!("{}", e);
tracing::debug!("RX task failed: {}", e);
// Spawn a task to avoid a deadlock waiting for this same task
// to finish in the close() joining its handle
zenoh_runtime::ZRuntime::Net.spawn(async move { c_transport.delete().await });
Expand Down
8 changes: 6 additions & 2 deletions io/zenoh-transport/src/unicast/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -746,13 +746,17 @@ impl TransportManager {
let c_manager = self.clone();
self.task_controller
.spawn_with_rt(zenoh_runtime::ZRuntime::Acceptor, async move {
if let Err(e) = tokio::time::timeout(
if tokio::time::timeout(
c_manager.config.unicast.accept_timeout,
super::establishment::accept::accept_link(link, &c_manager),
)
.await
.is_err()
{
tracing::debug!("{}", e);
tracing::debug!(
"Failed to accept link before deadline ({}ms)",
c_manager.config.unicast.accept_timeout.as_millis()
);
}
incoming_counter.fetch_sub(1, SeqCst);
});
Expand Down
4 changes: 2 additions & 2 deletions io/zenoh-transport/src/unicast/universal/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl TransportLinkUnicastUniversal {
.await;

if let Err(e) = res {
tracing::debug!("{}", e);
tracing::debug!("TX task failed: {}", e);
// Spawn a task to avoid a deadlock waiting for this same task
// to finish in the close() joining its handle
// TODO(yuyuan): do more study to check which ZRuntime should be used or refine the
Expand Down Expand Up @@ -125,7 +125,7 @@ impl TransportLinkUnicastUniversal {

// TODO(yuyuan): improve this callback
if let Err(e) = res {
tracing::debug!("{}", e);
tracing::debug!("RX task failed: {}", e);

// Spawn a task to avoid a deadlock waiting for this same task
// to finish in the close() joining its handle
Expand Down