Skip to content

Conversation

@coderzc
Copy link
Member

@coderzc coderzc commented Jul 28, 2025

Motivation

Currently, when there is an exception in checking the connect message, we directly close the channel. However, the client might keep retrying indefinitely. It's best for us to return a connection error to the client.

Modifications

For CONNECT message errors, send a CONNACK error response then close channel.
For other message errors, send a DISCONNECT error response if supported then close channel.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

Documentation

Check the box below.

Need to update docs?

  • doc-required

    (If you need help on updating docs, create a doc issue)

  • no-need-doc

    (Please explain why)

  • doc

    (If this PR contains doc changes)

@github-actions
Copy link

@coderzc:Thanks for your contribution. For this PR, do we need to update docs?
(The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

@coderzc coderzc force-pushed the fix_connect_refused branch from 04bd631 to 5983d79 Compare July 28, 2025 13:02
@Technoboy- Technoboy- merged commit 06b9763 into master Jul 29, 2025
48 checks passed
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.

3 participants