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

enhance: gudp conn feature #3491

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

enhance: gudp conn feature #3491

wants to merge 2 commits into from

Conversation

gqcn
Copy link
Member

@gqcn gqcn commented Apr 16, 2024

No description provided.

net/gudp/gudp_server.go Outdated Show resolved Hide resolved
net/gudp/gudp_conn_client_conn.go Outdated Show resolved Hide resolved
net/gudp/gudp_conn_client_conn.go Outdated Show resolved Hide resolved
net/gudp/gudp_conn_server_conn.go Outdated Show resolved Hide resolved
@gqcn gqcn added this to the v2.8.0 milestone Apr 17, 2024
if err == io.EOF {
return err
}
// Still failed even after retrying.
Copy link
Member

Choose a reason for hiding this comment

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

这里是不是可以把for循环提出来,第一次调用write没有错误时,直接返回即可,如果有错误,且有retry参数的话,再用for循环尝试发送,这样是不是会好点?

return err
}
// Still failed even after retrying.
if len(retry) == 0 || retry[0].Count == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

这里和client同理

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.

None yet

3 participants