Unfortunately, there is no specific way to detect when the app server is shut down or when a client is disconnected directly. We use a heartbeat system to detect when the connection has been broken, and unsubscribe events will be fired at the time the housekeeper reigns those dead connections in.

Yes, you can. This needs to be better documented and the API will probably need to be cleaned up in the future. But you can change the LogAdapter which is responsible for showing that default error dialog: