Server closed the connection but the extension is unaware yet, e.g. after resuming from sleep
User wants to execute a query
When the user resumes from sleep, the extension still thinks the q server is connected, and allows you to execute a query. Once doing so, it immediately says "Lost connection to..." but the query remains in executing state on the extension's side. Because of this, even after reconnecting, it says "Still executing last query" and the only solution is to restart VS Code.
Additionally, the extension should attempt to gracefully reconnect to the server if the connection was lost to make this an even more pleasant developer experience.
Prerequisite:
When the user resumes from sleep, the extension still thinks the q server is connected, and allows you to execute a query. Once doing so, it immediately says "Lost connection to..." but the query remains in executing state on the extension's side. Because of this, even after reconnecting, it says "Still executing last query" and the only solution is to restart VS Code.
Could this be improved so that the busy attribute https://github.com/jshinonome/vscode-q/blob/97714fdd001756b97d4e1f3f385bf38aa79913cd/src/client/modules/q-conn-manager.ts#L147 is cleared if the connection is closed/reopened? I believe that could fix it.
Additionally, the extension should attempt to gracefully reconnect to the server if the connection was lost to make this an even more pleasant developer experience.