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

Throw Error in Socket::available if Socket Error Occurs #4539

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

andrewauclair
Copy link
Contributor

Changes to help address the issues I was seeing in #4537. This change makes SocketImpl::available throw an error exception if the result of recvfrom is negative and there was a socket error for UDP sockets. This will correctly inform the calling code that the socket is invalid and needs to be reset. This also fixes the issue with receiveBytes throwing std::bad_array_new_length because it will instead throw a Poco exception first when calling available.

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.

None yet

1 participant