It would be nice if you could show the user when the session has stopped responding. E.g. by greying out the window and displaying a spinner. We won't be able to handle stuck applications, but we could at least handle network or server issues.
Technically we could implement this by sending fence packets at a certain interval. If we don't get any replies then we can assume things have locked up.
*** Bug 5349 has been marked as a duplicate of this bug. ***