How do I prevent the reconnected liveview to redraw part of the DOM?

I want to implement some time limited contents via liveview. Once the content expires, the server side will instruct the client to disconnect and the liveview become a deadview holding the last good content. However, when the user disconnect and reconnect on their own, the content may already expired in the meantime. The server side knows if the content expired, and does not hold the expired content anymore. So there are 2 cases:

  1. Not expired. Send updated content to the client as usual
  2. Expired. send a flash message saying the content has expired and keep the content as is in the client side.

In the second case, I send the flash, instruct the client side to disconnect the liveview socket. Everything works, except the content still disappears, due to the redraw. How do I prevent this?