From 6cce55a359e54de4d8d0b58ea1d7a298566826c9 Mon Sep 17 00:00:00 2001 From: yaacov Date: Tue, 9 May 2017 22:45:47 +0300 Subject: [PATCH] bump bugfix version --- index.js | 6 +++--- package.json | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index f6a1be8..fd51b91 100644 --- a/index.js +++ b/index.js @@ -182,10 +182,7 @@ var ModbusRTU = function(port) { // state variables this._transactions = {}; - this._port._transactionId = 1; - this._timeout = null; // timeout in msec before unanswered request throws timeout error - this._unitID = 1; }; @@ -210,6 +207,9 @@ ModbusRTU.prototype.open = function(callback) { if (callback) callback(error); + /* init ports transaction id */ + modbus._port._transactionId = 1; + /* On serial port success * register the modbus parser functions */ diff --git a/package.json b/package.json index 58fc2fd..bd07c75 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "modbus-serial", - "version": "5.2.11", + "version": "5.2.12", "description": "A pure JavaScript implemetation of MODBUS-RTU (Serial and TCP) for NodeJS.", "main": "index.js", "scripts": {