feat: 新增 输出通道2
This commit is contained in:
parent
54a9696bbf
commit
d92024a145
@ -95,15 +95,8 @@ public class RtkClusterService implements ApplicationRunner {
|
||||
String localPath = "127.0.0.1:" + workPort;
|
||||
profile.setInpstr1Path(localPath);
|
||||
profile.setOutstr1Path(localPath);
|
||||
// Also write outstr2_path from group if present
|
||||
try {
|
||||
if (profile.getGroupId() != null && groupMapper != null) {
|
||||
RtkrcvGroup group = groupMapper.selectById(profile.getGroupId());
|
||||
if (group != null && group.getOutstr2Path() != null && !group.getOutstr2Path().trim().isEmpty()) {
|
||||
profile.setOutstr2Path(group.getOutstr2Path().trim());
|
||||
}
|
||||
}
|
||||
} catch (Exception ignore) {}
|
||||
// Set outstr2-path to the same local endpoint as requested
|
||||
profile.setOutstr2Path(localPath);
|
||||
profileMapper.updateById(profile);
|
||||
|
||||
// 3) Generate config and start rtkrcv
|
||||
|
||||
@ -73,13 +73,11 @@ public class RtkrcvConfigService {
|
||||
replaced = replaceIfNotBlank(replaced, "outstr2-path", profile.getOutstr2Path());
|
||||
// If local tcp endpoints are used (e.g., 127.0.0.1:port), force type to tcpcli
|
||||
if (looksLikeTcpEndpoint(profile.getInpstr1Path())) {
|
||||
replaced = replaceValueLine(replaced, "inpstr1-type", "tcpcli");
|
||||
// relax timeouts to avoid frequent reconnects on local streams
|
||||
replaced = replaceValueLine(replaced, "misc-timeout", "300000");
|
||||
replaced = replaceValueLine(replaced, "misc-reconnect", "3000");
|
||||
}
|
||||
if (looksLikeTcpEndpoint(profile.getOutstr1Path())) {
|
||||
replaced = replaceValueLine(replaced, "outstr1-type", "tcpcli");
|
||||
// Do not force outstr1-type; only relax timeouts for local tcp endpoints
|
||||
replaced = replaceValueLine(replaced, "misc-timeout", "300000");
|
||||
replaced = replaceValueLine(replaced, "misc-reconnect", "3000");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user