Skip to content

Commit

Permalink
Actually set the options #636
Browse files Browse the repository at this point in the history
  • Loading branch information
rstrouse committed Nov 18, 2022
1 parent 72b4c28 commit 05ffd2a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion controller/comms/Comms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ export class RS485Port {
let opts = extend(true, { keepAliveInitialDelay: 0 }, this._cfg.netSettings);
// Convert the initial delay to milliseconds.
if (typeof this._cfg.netSettings !== 'undefined' && typeof this._cfg.netSettings.keepAliveInitialDelay === 'number') opts.keepAliveInitialDelay = this._cfg.netSettings.keepAliveInitialDelay * 1000;
let nc: net.Socket = new net.Socket(this._cfg.netSettings);
let nc: net.Socket = new net.Socket(opts);
nc.once('connect', () => { logger.info(`Net connect (socat) ${this._cfg.portId} connected to: ${this._cfg.netHost}:${this._cfg.netPort}`); }); // Socket is opened but not yet ready.
nc.once('ready', () => {
this.isOpen = true;
Expand Down

0 comments on commit 05ffd2a

Please sign in to comment.