Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proxy: ensure conn is always non-nil #184

Merged
merged 5 commits into from
Jan 11, 2023
Merged

Conversation

xhebox
Copy link
Collaborator

@xhebox xhebox commented Jan 11, 2023

Signed-off-by: xhe xw897002528@gmail.com

What problem does this PR solve?

Issue Number: close #181

Problem Summary: Ensure it is always non-nil, while eliminated double close issue. Note that is OK to call XXXAddr after connection is closed.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Notable changes

  • Has configuration change
  • Has HTTP API interfaces change (Don't forget to add the declarative for API)
  • Has tiproxyctl change
  • Other user behavior changes

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: xhe <xw897002528@gmail.com>
@xhebox xhebox requested a review from djshow832 January 11, 2023 05:19
Copy link
Collaborator

@djshow832 djshow832 left a comment

Choose a reason for hiding this comment

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

Please always add some test cases.

pkg/proxy/net/packetio.go Outdated Show resolved Hide resolved
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
Signed-off-by: xhe <xw897002528@gmail.com>
@xhebox xhebox requested a review from djshow832 January 11, 2023 06:26
@xhebox xhebox merged commit dec59b4 into pingcap:main Jan 11, 2023
@xhebox xhebox deleted the serverless_4 branch January 11, 2023 06:35
xhebox added a commit to xhebox/TiProxy that referenced this pull request Mar 7, 2023
xhebox added a commit to xhebox/TiProxy that referenced this pull request Mar 13, 2023
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.

Panic when closing a connection
3 participants