Skip to content

Commit

Permalink
remove unneeded variable client
Browse files Browse the repository at this point in the history
  • Loading branch information
DutchmanNL committed Aug 7, 2023
1 parent 42e8179 commit c2960e1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const MpptModes = require(__dirname + '/lib/MpptModes.js');
const BleReasons = require(__dirname + '/lib/BleReasons.js');
const MonitorTypes = require(__dirname + '/lib/MonitorTypes.js');
const warnMessages = {}; // Array to avoid unneeded spam too sentry
let client, polling, port;
let polling, port;

const disableSentry = true; // Ensure to set to true during development !

Expand Down Expand Up @@ -267,13 +267,6 @@ class Vedirect extends utils.Adapter {
port.close();
this.log.info('VE.Direct terminated, all USB connections closed');

// Write message in log related to server connection
client.on('end', () => {
this.setState('info.connection', false, true);
// Need to add logic for retry / restart
this.log.warn('VE.Direct disconnected');
});

callback();
} catch (e) {
callback();
Expand Down

0 comments on commit c2960e1

Please sign in to comment.