Skip to content

feat: multi-address client support and stale connection fix on reconnect#2136

Open
gdcodedev wants to merge 4 commits into
debauchee:masterfrom
gdcodedev:feature/multi-address-reconnect-fix
Open

feat: multi-address client support and stale connection fix on reconnect#2136
gdcodedev wants to merge 4 commits into
debauchee:masterfrom
gdcodedev:feature/multi-address-reconnect-fix

Conversation

@gdcodedev
Copy link
Copy Markdown

@gdcodedev gdcodedev commented Apr 24, 2026

Summary

  • Multi-address / hostname support: Server address field accepts comma-separated list (e.g. 192.168.1.1, myserver.ddns.net). Client cycles automatically when a connection fails.
  • Stale connection replaced on reconnect: Server closes the dead connection and accepts the new one instead of rejecting the reconnecting client.
  • Build modernisation: CMake 4.x compatibility, VS 2022 support, Inno Setup 6 compatibility.

Test Plan

  • Multi-address: configure 192.168.1.x, yourdomain.ddns.net — verify LAN uses local IP
  • Change network — verify client reconnects via hostname within seconds
  • Abrupt disconnect — verify server accepts reconnection without already connected warning
  • CMake 4.x build — no cmake_minimum_required error
  • 139 unit tests pass

Client:
- Allow comma-separated server addresses in the GUI field
  (e.g. "192.168.1.1, myserver.ddns.net"). The client cycles
  through each address automatically when a connection attempt
  fails, enabling seamless fallback between LAN IP and external
  hostname after a network change.
- Rename "Server IP:" label to "Server IP / Hostname:" to clarify
  that DNS hostnames are accepted.
- Add Client::setServerAddress() to allow address cycling between
  reconnect attempts without recreating the client object.

Server:
- When a client reconnects with the same screen name while the
  previous connection is still registered (common after a network
  change), replace the stale connection instead of rejecting the
  new one. Previously the server would refuse the reconnecting
  client, leaving it unable to re-establish until manually
  restarted.
@gdcodedev gdcodedev force-pushed the feature/multi-address-reconnect-fix branch from 8eb9780 to 58fd5b5 Compare April 24, 2026 18:34
MSBuild (Visual Studio) places binaries in bin/Release/ while
single-config generators (Ninja, Makefiles) use bin/ directly.
Introduce BARRIER_INSTALLER_BIN_DIR that selects the right path
based on CMAKE_CONFIGURATION_TYPES.
Using else-if chains with paths containing parentheses (e.g.
'Program Files (x86)') caused the batch parser to interpret the
closing paren as the end of the if-block, producing the error
'\Inno was unexpected at this time.' Use sequential if+goto
instead, which avoids nested parentheses entirely.

Also switch from hardcoded C:\Program Files (x86) to
%ProgramFiles(x86)% for correctness on non-English Windows.
x64compatible was introduced in Inno Setup 6.3.0. Inno Setup 6.2.x
(used in CI) only recognises x64, arm64. Using x64 is equivalent for
64-bit Windows builds and compatible with all Inno Setup 6.x releases.
@gdcodedev gdcodedev closed this Apr 24, 2026
@gdcodedev gdcodedev deleted the feature/multi-address-reconnect-fix branch April 24, 2026 19:24
@gdcodedev gdcodedev restored the feature/multi-address-reconnect-fix branch April 24, 2026 19:27
@gdcodedev gdcodedev reopened this Apr 24, 2026
@nbolton
Copy link
Copy Markdown

nbolton commented Apr 25, 2026

Barrier is no longer in development. Check out Deskflow (upstream) or Input Leap (fork).

https://github.com/deskflow/deskflow
https://github.com/input-leap/input-leap

If this is still an issue in those projects, we would appreciate a cross-post of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants