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

optimize: Fix error reporting during server shutdown process #1065 #1086

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

YarBor
Copy link

@YarBor YarBor commented Apr 7, 2024

What type of PR is this?

optimize

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

修复服务器shutdown过程中的报错问题

(Optional) Which issue(s) this PR fixes:

#1065

(Optional) The PR that updates user documentation:

…er shutdown

Signed-off-by: YarBor <yarbor.ww@gmail.com>
@YarBor YarBor requested review from a team as code owners April 7, 2024 02:39
@CLAassistant
Copy link

CLAassistant commented Apr 7, 2024

CLA assistant check
All committers have signed the CLA.

@FGYFFFF FGYFFFF changed the title optimize(hz) : Fix error reporting during server shutdown process #1065 optimize: Fix error reporting during server shutdown process #1065 Apr 7, 2024
@YarBor
Copy link
Author

YarBor commented Apr 9, 2024

@welkeyever Hey, is there anything to improve on this PR?

"time"

"github.com/cloudwego/hertz/pkg/common/config"
"github.com/cloudwego/hertz/pkg/common/hlog"
"github.com/cloudwego/hertz/pkg/network"
)

const (
transportAlive int32 = 0
Copy link
Member

Choose a reason for hiding this comment

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

Is this constant useless?

@welkeyever
Copy link
Member

@welkeyever Hey, is there anything to improve on this PR?

Sorry for the late, I'll take look

@@ -100,7 +110,12 @@ func (t *transport) Close() error {
return t.Shutdown(ctx)
}

func (t *transport) IsCallShutdown() bool {
Copy link
Member

Choose a reason for hiding this comment

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

Only for internal use, maybe no need to public it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants