Revert "fix(connect): trust direct path on peer report timeout"
This reverts commit 82b439595c.
This commit is contained in:
@@ -503,29 +503,13 @@ async fn connect(
|
|||||||
peer_ok
|
peer_ok
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
// Timeout — the peer's report
|
// Timeout or channel error — peer
|
||||||
// didn't arrive. This happens when
|
// may be on an old build without
|
||||||
// peers are on different relays
|
// Phase 6. Fall back to relay.
|
||||||
// (no federation for MediaPathReport)
|
emit_call_debug(&app, "connect:peer_report_timeout", serde_json::json!({}));
|
||||||
// or the peer is on an old build.
|
|
||||||
//
|
|
||||||
// If OUR direct path succeeded and
|
|
||||||
// the transport is still alive,
|
|
||||||
// trust it — the timeout is a relay
|
|
||||||
// forwarding issue, not a direct
|
|
||||||
// path failure.
|
|
||||||
let mut sig = state.signal.lock().await;
|
let mut sig = state.signal.lock().await;
|
||||||
sig.pending_path_report = None;
|
sig.pending_path_report = None;
|
||||||
let trust_direct = local_direct_ok
|
false
|
||||||
&& race_result.direct_transport.as_ref()
|
|
||||||
.map(|t| t.connection().close_reason().is_none())
|
|
||||||
.unwrap_or(false);
|
|
||||||
emit_call_debug(&app, "connect:peer_report_timeout", serde_json::json!({
|
|
||||||
"local_direct_ok": local_direct_ok,
|
|
||||||
"direct_transport_alive": trust_direct,
|
|
||||||
"fallback": if trust_direct { "Direct" } else { "Relay" },
|
|
||||||
}));
|
|
||||||
trust_direct
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ if [ "$USE_ALT" = "1" ]; then
|
|||||||
GIT_ORIGIN="ssh://git@git.tbs.amn.gg:2222/manawenuz/wzp.git"
|
GIT_ORIGIN="ssh://git@git.tbs.amn.gg:2222/manawenuz/wzp.git"
|
||||||
# Alt server uploads directly (no .env file)
|
# Alt server uploads directly (no .env file)
|
||||||
UPLOAD_MODE="direct"
|
UPLOAD_MODE="direct"
|
||||||
PASTE_URL="https://paste.tbs.manko.yoga"
|
PASTE_URL="http://paste.tbs.amn.gg"
|
||||||
PASTE_AUTH="X2j6szIQaoJGaxZjLkpl3A8IX9/mTkDgdhhgyYFcpaU="
|
PASTE_AUTH="X2j6szIQaoJGaxZjLkpl3A8IX9/mTkDgdhhgyYFcpaU="
|
||||||
else
|
else
|
||||||
SERVER_TAG="PRI"
|
SERVER_TAG="PRI"
|
||||||
|
|||||||
Reference in New Issue
Block a user