Skip to content

Commit bf7c48e

Browse files
committed
🐛 handle proxy auth window closing
1 parent 9396dd4 commit bf7c48e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/vs/code/electron-main/auth.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,13 @@ export class ProxyAuthHandler {
7777
const javascript = 'promptForCredentials(' + JSON.stringify(data) + ')';
7878

7979
event.preventDefault();
80+
81+
const onWindowClose = () => cb('', '');
82+
win.on('close', onWindowClose);
83+
8084
win.webContents.executeJavaScript(javascript, true).then(({ username, password }: Credentials) => {
8185
cb(username, password);
86+
win.removeListener('close', onWindowClose);
8287
win.close();
8388
});
8489
}

0 commit comments

Comments
 (0)