Skip to content

Conversation

@yihaoDeng
Copy link
Contributor

Description

Issue(s)

  • Close/close/Fix/fix/Resolve/resolve: Issue Link

Checklist

Please check the items in the checklist if applicable.

  • Is the user manual updated?
  • Are the test cases passed and automated?
  • Is there no significant decrease in test coverage?

Copilot AI review requested due to automatic review settings January 8, 2026 06:29
@gemini-code-assist
Copy link
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR prevents error logging when SSL is disabled by adding an early return condition in the connection callback. The change ensures that SSL/SASL authentication code is only executed when both features are enabled, avoiding spurious errors when either feature is disabled.

Key Changes

  • Added early return in uvOnConnectionCb to skip SSL/SASL authentication handling when either feature is disabled
  • Reorganized struct fields in SRpcInfo for better grouping of SSL/SASL-related fields

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
source/libs/transport/src/transSvr.c Added pInst variable and early return condition to prevent SSL/SASL authentication code execution when features are disabled
source/libs/transport/inc/transportInt.h Reorganized enableSasl field placement and cleaned up comment formatting in SRpcInfo struct

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

return;
}

if (sslIsInited(pConn->pTls) && !saslAuthIsInited(pConn->saslConn)) {
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

Missing NULL check for pConn->saslConn before calling saslAuthIsInited. While the early return at line 1662 should prevent this case, defensive programming suggests adding an explicit NULL check similar to line 1027 which uses the pattern: if (conn->saslConn && sslIsInited(conn->pTls) && !saslAuthIsInited(conn->saslConn))

Suggested change
if (sslIsInited(pConn->pTls) && !saslAuthIsInited(pConn->saslConn)) {
if (pConn->saslConn && sslIsInited(pConn->pTls) && !saslAuthIsInited(pConn->saslConn)) {

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants