-
Notifications
You must be signed in to change notification settings - Fork 13.3k
No way to check, MDNSResponder::begin has been called or not #7214
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
Comments
There are two solutions :
Now f you read the code, you'll see that there is an internal variable holding that state. You are welcome to propose a pull request for a method |
Evaluating begin’s return value wouldn’t help because it’s not possible to distinguish why was it failed - is there any real fatal error or is it already running. That’s why all kernel calls and standard lib calls either return error code or throw an exception clearly describing the reason. |
Here is the internal test. Separate pull request are always preferred when they are independent because they need to be commented accurately. |
There's currently no way to check, is MDNSResponder::begin already called. There shall be a method that returns true if begin has been called and false if not (or close/end has been called). There shall be a bool member field default to false, set to true if begin succeeded and back to false when close/end succedded, and some method like bool isBegan(void) to check it
The text was updated successfully, but these errors were encountered: