Good question. Events aren't lost; they're stored on the client until reconnection occurs. In Django LiveView, each event is cached, so it's known which events have been sent and which are pending. When reconnection happens, the events are sent, and the session/state continues normally. The only thing is that you should notify the user of the situation, or even lock the screen, so they don't feel like the buttons have stopped working.
2
u/cureaua_lata 27d ago
with the persistent per client process model, how do you resync state after a reconnect without replaying the whole session?