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 6d9a2d2 commit 8ba468fCopy full SHA for 8ba468f
1 file changed
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