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

Prevents threads from looping indefinitely #61

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

chenhongjun
Copy link

When the iscsi client is powered off, the tgt socket has not finished sending data in the kernel, and the thread will loop indefinitely

@fujita
Copy link
Owner

fujita commented Oct 25, 2023

You meant in such case, write() still returns EAGAIN or EINTR instead of EIO?

@chenhongjun
Copy link
Author

You meant in such case, write() still returns EAGAIN or EINTR instead of EIO?

Yes. When the kernel sends the buffer full, the kernel tries asynchronous sending and timeout retransmission, while the tgtd process keeps calling the non-blocking send function, returning EAGAIN each time

@fujita fujita merged commit 4fcb60f into fujita:master Oct 25, 2023
1 check passed
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