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 panic push_receiver #243

Merged
merged 2 commits into from
May 8, 2021
Merged

handle panic push_receiver #243

merged 2 commits into from
May 8, 2021

Conversation

himsngh
Copy link
Contributor

@himsngh himsngh commented May 2, 2021

issue #239


if conn == nil {
ok := false
conn, ok = us.tryListen()
Copy link
Member

Choose a reason for hiding this comment

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

tryListen should be extract from StartServer() func. because us.tryListen () does not change the port.In Handleclient, you also need to interval the fetch of conn, for example, 5S once.Otherwise, the outer for loop will consume more resources.

应该将startServer func中获取tryListen 提取func, 目前这样直接tryListen 并没有换端口操作。 在handleClient中还需要将获取conn的操作进行间隔,例如5S一次。否则外层for循环会消耗较多资源。

Copy link
Contributor Author

@himsngh himsngh May 2, 2021

Choose a reason for hiding this comment

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

Okay yes, I got your point. One thing what do you mean when you say "you also need to interval the fetch of conn, for example, 5S once". Do you mean I need to add timers while fetching

@himsngh himsngh requested a review from binbin0325 May 7, 2021 05:27
@binbin0325
Copy link
Member

@himsngh 我重构了一下pr,有空可以review下

@himsngh
Copy link
Contributor Author

himsngh commented May 7, 2021

@himsngh 我重构了一下pr,有空可以review下

Thanks for all the help.

@binbin0325 binbin0325 merged commit 84fad6d into nacos-group:master May 8, 2021
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