3 Commits
Author SHA1 Message Date
TZGyn 29fa4a4c44 Stop tracking the compiled binary in version control
The ignore rule matched "share-*" but not the binary's actual name,
"share", so every build was committed and pushed. Ignore the binary
explicitly and untrack it; releases now carry the built artifacts.
2026-09-11 16:38:59 +08:00
TZGyn 84f3d62d68 Persist rooms across daemon restarts; add "share restart"; fix peer
count and a startup hang

- src/daemon/persist.go: rooms.json records every active room so a
  restarted daemon (crash, reboot, or "share stop" then relaunch) resumes
  them automatically. A --one-time room clears itself once it finishes
  on its own; anything else stays persisted since it only ever stops via
  an explicit Stop.
- "share restart": stops the running daemon, waits for it to actually
  release its socket, then relaunches it the same detached way
  EnsureRunning does.
- Fixed a real startup hang: resuming persisted rooms used to block
  before the daemon's Accept loop ever started, so a slow/unreachable
  relay in one persisted room could leave the daemon looking "alive" to
  IsRunning() while unable to answer any request — including its own
  successor's attempt to detect and clean up a stuck instance. Resuming
  now runs in the background instead. Added deadlines on both ends so a
  stuck daemon fails fast with an actionable message rather than hanging.
- Fixed peer counts being inflated by duplicate connections: two peers
  can end up with more than one link to each other (both sides happened
  to dial at once). Links now carry the remote peer's ID (known
  immediately when we dialed them, learned from their first manifest
  otherwise), and Status dedupes by that ID.
2026-07-20 14:29:42 +08:00
TZGyn 3a0ab392c0 Add .gitignore for local-only reference and test scratch folders 2026-07-20 11:13:49 +08:00