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

How to close socket when socket idle ? #1133

Open
liyinshubyte opened this issue May 14, 2024 · 3 comments
Open

How to close socket when socket idle ? #1133

liyinshubyte opened this issue May 14, 2024 · 3 comments
Labels
Need Info Need more information from the reporter question

Comments

@liyinshubyte
Copy link
Contributor

liyinshubyte commented May 14, 2024

@ffilz Hi, when the bug happens nfs-ganesha/ntirpc#294. Our nfs client hang, and client will not send any message to server. So when socket idle, we want to close socket in nfs-ganesha, and client will recover from hang. we only make this change in our company, and will not submit merge request to community to avoid bug. But I don't know how to close socket, because if I call SVC_DESTROY, I need to set xprt.xp_flags, not sure it's right or not. Could you give me some suggestions about how to close socket ?

@liyinshubyte
Copy link
Contributor Author

@dang cc

@dang
Copy link
Contributor

dang commented May 28, 2024

You shouldn't need to set anything, just call SVC_DESTROY(). By default, TCP sockets are closed when the xprt is destroyed.

@ffilz ffilz added question Need Info Need more information from the reporter labels May 28, 2024
@liyinshubyte
Copy link
Contributor Author

Thanks a lot, I will try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Need Info Need more information from the reporter question
Projects
None yet
Development

No branches or pull requests

3 participants