Skip to content

improv sockes atomic - #36

Merged
WantClue merged 1 commit into
mainfrom
sock-improv
Jul 10, 2026
Merged

improv sockes atomic#36
WantClue merged 1 commit into
mainfrom
sock-improv

Conversation

@WantClue

@WantClue WantClue commented Jul 10, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes

    • Improved reliability when streaming logs over WebSockets.
    • Ensured only the latest logging connection receives messages, while previous connections are closed cleanly.
    • Reduced the risk of stale or incorrectly routed log messages.
  • Performance & Stability

    • Improved handling of concurrent WebSocket connections and asynchronous log delivery.
    • Enhanced HTTP connection cleanup and resource management.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 02fadb8a-9e3f-4af7-92d6-3fad07842e6f

📥 Commits

Reviewing files that changed from the base of the PR and between af1452a and 38ee09c.

📒 Files selected for processing (1)
  • main/http_server/http_server.c

📝 Walkthrough

Walkthrough

The HTTP server now queues dynamically allocated WebSocket log messages, tracks the active client with an atomic descriptor, sends logs asynchronously, replaces previous clients during handshakes, and applies updated connection lifecycle settings.

Changes

WebSocket logging

Layer / File(s) Summary
Queued log message delivery
main/http_server/http_server.c
Logging formats messages into dynamically sized payloads, queues message objects, assigns the active socket, and asynchronously sends validated WebSocket text frames.
Connection replacement and server lifecycle
main/http_server/http_server.c
WebSocket handshakes atomically replace the active client, close handling clears matching descriptors, and HTTP server keep-alive, LRU purge, and socket limits are configured.

Estimated code review effort: 4 (Complex) | ~45 minutes

Poem

A rabbit hops where log lines stream,
Through atomic gates and queues they gleam.
Old sockets close, new clients cheer,
Async messages arrive clear.
Fluffy ears approve the scheme!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The title appears related to the socket/atomic changes, but it is too vague and typo-ridden to clearly describe the main change. Use a clear, specific title such as "Make WebSocket logging socket handling atomic".
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@WantClue
WantClue merged commit eb9755b into main Jul 10, 2026
3 checks 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.

1 participant