Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Catch exceptions from UdpClient.Recieve #107

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

Conversation

ogonzalez-sd
Copy link

Common occurrance: SocketException: Connection was closed by remote host

Common occurrance: SocketException: Connection was closed by remote host
Copy link
Owner

@lontivero lontivero left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution. Please address the comments in my feedback.

Open.Nat/Discovery/Searcher.cs Outdated Show resolved Hide resolved
Open.Nat/Discovery/Searcher.cs Outdated Show resolved Hide resolved
Moved try/catch to Search's while loop

Used tabs, not spaces

Removed unnecessary line
@ogonzalez-sd
Copy link
Author

I moved the try/catch block, but I still think exceptions should be caught inside Receive's loop so that we can continue to read from other sockets if any should fail, but I defer to your expertise

@ogonzalez-sd
Copy link
Author

@lontivero Let me know these follow up changes are satisfactory

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants