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

Check if the client still has connection before calling Send in a try/catch #41

Merged

Conversation

doingnz
Copy link
Contributor

@doingnz doingnz commented Feb 29, 2024

The UDP logger needs to check the connection is still valid before calling Send and use try/catch to trap other exceptions to avoid the calling thread getting killed if the network has unexpectedly died or becomes inaccessible.

This change also marks some properties only initialised in the constructor as readonly to show the intent they should not be changed by other parts of the class.

adrianstevens and others added 19 commits June 2, 2023 22:41
…r. Changed async void Send<T> to async Task Send<T> and awaits on public calls to it.
added using to FileStream instances in both FileLogger and CloudLogge…
Chnage variables create in construtor to readonly to show intent. Check if _client still connected before creating message and attempting to send message.
@ctacke ctacke merged commit bfe7e92 into WildernessLabs:develop Mar 16, 2024
2 checks passed
@doingnz doingnz deleted the develop-checki-client-connected-udp branch April 9, 2024 21:17
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.

6 participants