mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-23 16:42:19 +00:00
* fix(#3326): automated AI fix * fix: address Codex review on PR #3328 * fix: address Codex review on PR #3328 * fix(port-forwarding): honor explicit reconnect preference * fix(port-forwarding): save auto-start alongside reconnect preference * fix(port-forwarding): coordinate tray starts in main window --------- Co-authored-by: netcatty-bot <308658023+netcatty-bot@users.noreply.github.com> Co-authored-by: bincxz <16399091+binaricat@users.noreply.github.com>
13 lines
498 B
TypeScript
13 lines
498 B
TypeScript
import type { PortForwardingRule } from "./models";
|
|
|
|
/**
|
|
* Whether a port-forwarding rule should automatically reconnect (with bounded
|
|
* retries) after an unexpected disconnect.
|
|
*
|
|
* Legacy rules without `autoReconnect` retain their auto-start reconnect
|
|
* behavior. An explicit choice always takes precedence.
|
|
*/
|
|
export const isPortForwardingAutoReconnectEnabled = (
|
|
rule: Pick<PortForwardingRule, "autoStart" | "autoReconnect">,
|
|
): boolean => rule.autoReconnect ?? rule.autoStart === true;
|