This code is correct work if user close one or two tabs of browser
@HostListener('window:beforeunload')
async ngOnDestroy() {
if (this.myValueSub) {
this.myValueSub.unsubscribe();
}
await this.authService.logout();
}
But this code not work if user close multiple browser tabs at once (five tabs or more)
What is the problem?
Can't determine the cause of the problem