jshinonome / vscode-q

vscode kdb+/q extension
GNU General Public License v3.0
41 stars 16 forks source link

vscode-q client fails to gracefully reconnect after interruption (e.g. laptop sleep) #50

Closed milosivanovic closed 2 years ago

milosivanovic commented 2 years ago

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.

jshinonome commented 2 years ago

There is a command kdb+/q ext: abort current query to stop the execution. Let me try something with close signal.

jshinonome commented 2 years ago

Added a button to server explorer for "abort current query"