mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-29 16:06:36 +08:00
fix(backend): enable noDelay for relay connector to fix chain failover
When using relay connector with noDelay=false (default), connection errors are deferred until first read/write. This prevents the forwarder marker from being called, causing failover to never trigger. Setting nodelay=true ensures connection errors propagate immediately, allowing proper failover behavior when chain targets are unreachable.
This commit is contained in:
@@ -51,6 +51,10 @@ public class GostUtil {
|
||||
|
||||
JSONObject connector = new JSONObject();
|
||||
connector.put("type", "relay");
|
||||
// 启用 noDelay 以确保连接错误能立即传播,使故障转移正常工作
|
||||
JSONObject connectorMetadata = new JSONObject();
|
||||
connectorMetadata.put("nodelay", true);
|
||||
connector.put("metadata", connectorMetadata);
|
||||
|
||||
Node node_info = node_s.get(chainTunnel.getNodeId());
|
||||
JSONObject node = new JSONObject();
|
||||
|
||||
Reference in New Issue
Block a user