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

*: handle more nil error cases #129

Merged
merged 1 commit into from
Nov 2, 2022
Merged

*: handle more nil error cases #129

merged 1 commit into from
Nov 2, 2022

Conversation

xhebox
Copy link
Collaborator

@xhebox xhebox commented Nov 2, 2022

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

What problem does this PR solve?

Issue Number: close None

Problem Summary: There are two problems.

  1. p.wrap is an error intended to wrap other errors, it should be appended to the error list of pnet.Conn.Close().
  2. Change how errors.Wrap handles nil.

This fixes [1.667360865291243e+09] [error] [main.proxy] [close connection fails] [connID=0] [remoteAddr="[::1]:51379"] [error="failed to close client connection:\n\tfailed to close the connection:\n\tthis is an error from client"].

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 November 2, 2022 04:18
@djshow832 djshow832 merged commit 4f31e77 into pingcap:main Nov 2, 2022
@xhebox xhebox deleted the err_1 branch November 2, 2022 08:50
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.

2 participants