Closed gfcittolin closed 4 years ago
Testing the following snippet (autoReconnect in the default value, 5000 ms), S7Endpoint does not try to reconnect again:
autoReconnect
const { S7Endpoint } = require('nodes7'); console.log('Connecting to PLC...') let plc = new S7Endpoint({ host: '192.168.15.123', slot: 1 }); plc.on('connect', () => console.log('PLC#connect')); plc.on('error', e => console.log('PLC#error', e)); plc.on('disconnect', () => console.log('PLC#disconnect'));
The issue seems to be related to a double-cleanup of the connection, resulting in the reconnect timer from the first attempt being cleaned-up.
As discovered in #98
Duplicate of #101, following the issue there
Testing the following snippet (
autoReconnect
in the default value, 5000 ms), S7Endpoint does not try to reconnect again:The issue seems to be related to a double-cleanup of the connection, resulting in the reconnect timer from the first attempt being cleaned-up.
As discovered in #98