Skip to content

Commit 5be8531

Browse files
committed
don't try restarting dcd after shutdownRequest, shutdown on exit
1 parent 9584d80 commit 5be8531

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

source/app.d

+2
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ void processNotify(RequestMessage msg)
106106
if (msg.method == "exit" || served.extension.shutdownRequested)
107107
{
108108
rpc.stop();
109+
if (!served.extension.shutdownRequested)
110+
served.extension.shutdown();
109111
return;
110112
}
111113
if (msg.method == "workspace/didChangeConfiguration")

source/served/extension.d

+2
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ void handleBroadcast(JSONValue data)
245245

246246
void startDCD()
247247
{
248+
if (shutdownRequested)
249+
return;
248250
hasDCD = safe!(dcd.start)(workspaceRoot, config.d.dcdClientPath,
249251
config.d.dcdServerPath, cast(ushort) 9166, false);
250252
if (hasDCD)

0 commit comments

Comments
 (0)