This adds a try/catch to help catch errors when Bonjour is not running.
For the unhandled rejection, I debated whether to push the error dialog out to the frontend, but kept it in the backend in case the frontend was part of the unexpected problem. I'm open to suggestions though if there's a preferred way to do this.
The try/catch will prevent the app from exiting even if Bonjour isn't running; I verified Interviewer can still pair. To test the error dialog, you would need to insert code to throw an artificial error, or comment out the try/catch in Server.js while Bonjour is stopped if you want to recreate the inspiration for this fix.
Note that in development mode, I did not see the same error as in production. The check for mdnsIsSupported works as hoped during development mode, but is more generous during production.
This adds a try/catch to help catch errors when Bonjour is not running.
For the unhandled rejection, I debated whether to push the error dialog out to the frontend, but kept it in the backend in case the frontend was part of the unexpected problem. I'm open to suggestions though if there's a preferred way to do this.
The try/catch will prevent the app from exiting even if Bonjour isn't running; I verified Interviewer can still pair. To test the error dialog, you would need to insert code to throw an artificial error, or comment out the try/catch in Server.js while Bonjour is stopped if you want to recreate the inspiration for this fix.
Note that in development mode, I did not see the same error as in production. The check for mdnsIsSupported works as hoped during development mode, but is more generous during production.