liveSocket.disconnect() unexpected behavior with longpoll

Hi!

Today I noticed that when a LiveSocket goes into longpoll fallback mode, calling liveSocket.disconnect() on the browser console behaves different than when the LiveSocket is connected over a WebSocket.

liveSocket.disconnect() with WS causes a “client-error” flash message to appear.

liveSocket.disconnect() with LP causes a “server-error” flash message, even though the server is fully functional.

I’m not sure if this is by design and an inherent artifact of the transport choice, or how to better understand what’s going on. Has anyone noticed the same or have some light to shed?

Thanks!

IMO these defaults have only one scope, that is to debug visually if the socket disconnects or the server is reloading on dev, you want to disable those flash messages in any kind of prod environment.