Closed charlesrich closed 9 years ago
@lring Lazlo, could you please tell me again (as you did on the phone),where the message is received by Java, when the Hangout plugin is initialized (it sends the id), so I can piggy-back on that for grabbing the camera. I will still put in some delay, but it can be less than if I put this code elsewhere. A really long delay for the camera at startup is a bit of a pain for demos. Tx, CR
Thanks. But now that I think about it more, if the client is unable to successfully establish a Hangout connection when it starts up, does it still send this message (i.e., with a null value) or does it not get sent at all (in which case SHORE will never get the camera). Can you send the message in all cases?
That's interesting, because I tested starting up the complete system with the internet disconnected and was happy to see that nothing hangs. I assume that is because the Hangout setup is on a separate thread, so just that thread hung?
What happens if the internet connection comes back after SHORE has already grabbed the camera?
Wouldn't it make more sense for the the client to try for some period of time and then give up and send a message with null id (which could then signal SHORE that it is safe to take the camera)?
If you already catch a timeout exception, then it would be simple to do this instead of trying again.
-CR
Or the internet connection isn't necessarily down, but the hangout site is just not responding...
Hi Lazlo, Thanks for doing these experiments.
What happens when (your case 2), the internet comes back and the Hangout plugin automatically attempts to reconnect itself? If this crashes the Java SHORE process, that would be bad, but if SHORE keeps running fine and the C# Hangout thread just hangs and doesn't otherwise bother the client, then I think that we are ok? Can you test this (by plugging and unplugging wires)?
Regardless, I am still a bit unclear about the best place to put the Java code for SHORE initialization. What exactly what happens in your case 1 above: Does a message always get sent to Java (possibly with id=null) after some amount of time, even if Hangout was not successfully initialized?
Btw, remember that the failure of Hangout to initialize could be due to the Google site temporarily not responding (for some reason), not just the complete internet connection being down.
This is the problem that the shore system doesn't wait long enough after Hangout initializes before taking the camera. Input by Candy