Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
arteck authored Oct 18, 2023
1 parent e986e0e commit ac21254
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,13 @@ class judoisoftControll extends utils.Adapter {
this.setState('info.connection', false, true);
this.log.error('getInfosCloud ERROR reconnect');
this.log.info("reconnect " + Date.now());
_tokenData = await this.getTokenFirst();
let conResult = await axios.get(baseUrl + "?token=" + _tokenData + "&group=register&command=get%20device%20data", {httpsAgent: agent});
clearInterval(_requestInterval);
this.getInfosCloud();
try {
_tokenData = await this.getTokenFirst();
let conResult = await axios.get(baseUrl + "?token=" + _tokenData + "&group=register&command=get%20device%20data", {httpsAgent: agent});
clearInterval(_requestInterval);
this.getInfosCloud();
} catch (err) {
return void this.restart();
}
}

Expand Down

0 comments on commit ac21254

Please sign in to comment.