Lxd refresh cause container socket error

It is great that snap automatically refreshes packages automatically. But very often when lxd refreshes, my container shell exits with Error: websocket: close 1006 (abnormal closure): unexpected EOF. Does anyone know why? It sometimes interrupts me when I’m building big project. And lxd refreshes are very frequent.