mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-06 17:23:53 -05:00
Merge from vscode cfc1ab4c5f816765b91fb7ead3c3427a7c8581a3
This commit is contained in:
@@ -270,7 +270,7 @@ export class RawDebugSession implements IDisposable {
|
||||
if (this.capabilities.supportsTerminateRequest) {
|
||||
if (!this.terminated) {
|
||||
this.terminated = true;
|
||||
return this.send('terminate', { restart }, undefined, 500);
|
||||
return this.send('terminate', { restart }, undefined, 1000);
|
||||
}
|
||||
return this.disconnect(restart);
|
||||
}
|
||||
@@ -481,7 +481,7 @@ export class RawDebugSession implements IDisposable {
|
||||
this.inShutdown = true;
|
||||
if (this.debugAdapter) {
|
||||
try {
|
||||
await this.send('disconnect', { restart }, undefined, 500);
|
||||
await this.send('disconnect', { restart }, undefined, 1000);
|
||||
} finally {
|
||||
this.stopAdapter(error);
|
||||
}
|
||||
@@ -601,9 +601,15 @@ export class RawDebugSession implements IDisposable {
|
||||
private send<R extends DebugProtocol.Response>(command: string, args: any, token?: CancellationToken, timeout?: number): Promise<R> {
|
||||
return new Promise<DebugProtocol.Response>((completeDispatch, errorDispatch) => {
|
||||
if (!this.debugAdapter) {
|
||||
errorDispatch(new Error(nls.localize('noDebugAdapter', "No debug adapter found. Can not send '{0}'.", command)));
|
||||
if (this.inShutdown) {
|
||||
// We are in shutdown silently complete
|
||||
completeDispatch();
|
||||
} else {
|
||||
errorDispatch(new Error(nls.localize('noDebugAdapter', "No debug adapter found. Can not send '{0}'.", command)));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
let cancelationListener: IDisposable;
|
||||
const requestId = this.debugAdapter.sendRequest(command, args, (response: DebugProtocol.Response) => {
|
||||
if (cancelationListener) {
|
||||
|
||||
Reference in New Issue
Block a user