We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f1dc59f commit a4f92b9Copy full SHA for a4f92b9
src/xdebugConnection.ts
@@ -823,7 +823,13 @@ export class Connection extends DbgpConnection {
823
}
824
825
})
826
- this.on('close', () => this._initPromiseRejectFn(new Error('connection closed (on close)')))
+ this.on('close', () => {
827
+ this._pendingCommands.forEach(command => command.rejectFn(new Error('connection closed (on close)')))
828
+ this._pendingCommands.clear()
829
+ this._commandQueue.forEach(command => command.rejectFn(new Error('connection closed (on close)')))
830
+ this._commandQueue = []
831
+ this._initPromiseRejectFn(new Error('connection closed (on close)'))
832
+ })
833
834
835
/** Returns a promise that gets resolved once the init packet arrives */
0 commit comments