提交 21e633cc 编写于 作者: I isidor

Catch the potential 'disconnect' error - no need to show it to the user since...

Catch the potential 'disconnect' error - no need to show it to the user since the adapter is shutting down

fixes #103105
上级 d92c1a8a
......@@ -281,7 +281,7 @@ export class RawDebugSession implements IDisposable {
if (this.capabilities.supportsTerminateRequest) {
if (!this.terminated) {
this.terminated = true;
return this.send('terminate', { restart }, undefined, 1000);
return this.send('terminate', { restart }, undefined, 2000);
}
return this.disconnect(restart);
}
......@@ -499,7 +499,9 @@ export class RawDebugSession implements IDisposable {
this.inShutdown = true;
if (this.debugAdapter) {
try {
await this.send('disconnect', { restart }, undefined, 1000);
await this.send('disconnect', { restart }, undefined, 2000);
} catch (e) {
// Catch the potential 'disconnect' error - no need to show it to the user since the adapter is shutting down
} finally {
this.stopAdapter(error);
}
......
......@@ -6,6 +6,7 @@
import { Emitter, Event } from 'vs/base/common/event';
import { IDebugAdapter } from 'vs/workbench/contrib/debug/common/debug';
import { timeout } from 'vs/base/common/async';
import { localize } from 'vs/nls';
/**
* Abstract implementation of the low level API for a debug adapter.
......@@ -88,7 +89,7 @@ export abstract class AbstractDebugAdapter implements IDebugAdapter {
request_seq: request.seq,
success: false,
command,
message: `timeout after ${timeout} ms`
message: localize('timeout', "Timeout after {0} ms for '{1}'", timeout, command)
};
clb(err);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册