Skip to content

fix: make WebSocket disconnects recoverable and actionable - #217

Merged
Razzmatazzz merged 1 commit into
the-hideout:masterfrom
GiribaldiTTV:feature/socket-resilience-diagnostics
Aug 17, 2026
Merged

fix: make WebSocket disconnects recoverable and actionable#217
Razzmatazzz merged 1 commit into
the-hideout:masterfrom
GiribaldiTTV:feature/socket-resilience-diagnostics

Conversation

@GiribaldiTTV

@GiribaldiTTV GiribaldiTTV commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Improve Tarkov.dev WebSocket resilience so recoverable disconnects do not
surface as noisy failures while required-send failures remain actionable.

This branch is rebased onto the current master, including the merged PR #212
Settings and profile-bound API-key work.

Why

The client previously treated an unexpectedly closed WebSocket as an
unstructured failure. This could leave the connection lifecycle unclear,
produce noisy diagnostics, and make later sends vulnerable to stale socket
state.

Changelog

User-visible

  • Recoverable connection interruptions remain quiet while the client restores
    the connection lazily.
  • A required send that cannot be completed produces one actionable diagnostic.
  • Connection incidents are deduplicated so repeated failures remain readable.
  • Existing Settings, profile-bound API-key management, and startup UI behavior
    from the current master are preserved.

Internal

  • Serialize WebSocket lifecycle operations and sends.
  • Add bounded reconnect backoff with cancellation-safe shutdown.
  • Handle fragmented, malformed, binary, and partial frames safely.
  • Avoid replaying messages after a partial batch has been sent.
  • Redact sensitive connection details from diagnostics.
  • Keep the socket change limited to DiagnosticModels.cs, MainBlazorUI.cs,
    MessageLog.cs, and SocketClient.cs.

Validation

  • Current-master baseline Release build completed with zero errors.
  • Reconciled branch Release build completed with zero errors.
  • Self-contained win-x64 single-file publish completed with zero errors.
  • Reconciliation completed without conflict markers or deleted files.

Known limitations

  • Recovery still depends on the Tarkov.dev service and the local network
    becoming reachable again.

@Razzmatazzz

Copy link
Copy Markdown
Member

@GiribaldiTTV could you please resolve the merge conflicts? Thanks!

Serialize socket lifecycle and sends, add bounded reconnect backoff, and prevent replay after partial batch failure. Keep recoverable background disconnects telemetry-only while surfacing one incident-scoped diagnostic for required send failures. Assemble fragmented frames, isolate malformed or binary records, bound payloads, and cancel idle or shutdown handshakes promptly.
@GiribaldiTTV
GiribaldiTTV force-pushed the feature/socket-resilience-diagnostics branch from 8089281 to 42510ef Compare August 14, 2026 04:08
@Razzmatazzz
Razzmatazzz merged commit cde7fe0 into the-hideout:master Aug 17, 2026
1 check passed
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