Open bhagath007 opened 6 years ago
As I understand you want idle/timeout not to be called if the user idle but the request in progress. Here I recommend to create your own interrupt sources and specify your own interrupt event which will be called for instance each second while there is at least one active http request
Hi,
I am using angular version 4.4.6 and latest ng-idle version.
For instance, I kept idle Timeout = 5sec and idle time = 5sec. So after 10 seconds of inactivity, I am getting logged out. It's working!
But when I called any HTTP request and if it takes more than 10sec to execute I am getting logged out but It shouldn't be.
Please help me out.
My ng-idle Functionality for your ref:-
constructor( private jhiLanguageHelper: JhiLanguageHelper, private loginService: LoginService, private principal: Principal, private router: Router, private idle: Idle, private keepalive: Keepalive, public dialog: MdDialog ) { this.timeOut = 5; this.idletime = 5; idle.setIdle(this.idletime); idle.setTimeout(this.timeOut); idle.setInterrupts(DEFAULT_INTERRUPTSOURCES);
Thanks Bhagath