Skip to content

Conversation

@OctopusTakopi
Copy link

No description provided.

@aurexav
Copy link
Member

aurexav commented Jan 31, 2026

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8f23985c8b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +20 to +22
let mut buf = [0u8; 1024];
let n = stream.read(&mut buf).await.unwrap();
let (request, _) = handshake::parse_request(&buf[..n]).unwrap().unwrap();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Handle partial handshake reads before parsing request

TCP reads are not message-framed, so the first read may return only part of the HTTP upgrade request. In that case handshake::parse_request returns Ok(None), and the immediate unwrap() will panic, making the benchmark flaky on slower or busy systems. Consider buffering and reading until the parser returns Some(request) (or use the crate’s server handshake helper) before proceeding.

Useful? React with 👍 / 👎.

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