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

Stop reading socket once descriptor is closed #86

Merged
merged 1 commit into from
Feb 6, 2025
Merged

Conversation

jjyr
Copy link
Collaborator

@jjyr jjyr commented Jan 27, 2025

https://github.com/utxostack/rust-lightning/blob/bdbfd070a10f46653c396788ffc49e6cb6ebb00f/lightning/src/ln/peer_handler.rs#L1574

read_event may return an error to indicate disconnect socket. But in the current implementation, we ignored this behavior and continue to read the 'closed' descriptor. to fix it, we simply stop reading a closed descriptor.

@jjyr jjyr requested review from Flouse and EthanYuan January 27, 2025 07:31
@Flouse Flouse merged commit ff01422 into develop Feb 6, 2025
9 checks passed
@Flouse Flouse deleted the fix-close-socket branch February 6, 2025 07:25
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.

3 participants