BiancoRoyal / node-red-contrib-iiot-opcua

deprecated - very new developed by PLUS for Node-RED - https://plus4nodered.com
https://www.npmjs.com/package/node-red-contrib-iiot-opcua
BSD 3-Clause "New" or "Revised" License
34 stars 8 forks source link

[Bug] Listener node hangs on deploy and hangs node-red until kill timeout #183

Closed biancode closed 1 year ago

biancode commented 2 years ago

Which node-red-contrib-iiot-opcua version are you using?

4.0.x

What happened?

If Listener node is to close on('close), then node-red hangs on deploy and stop. That was fixed in v3 and is back in v4. Mostly this comes from open promises or timers. All timers and promises had to close or stop on reset and stop.

Server

OPCUA-IIoT-Server Node

How can this be reproduced?

  1. Use listener and start monitoring
  2. change some and deploy or stop node-red
  3. node-red will stop just from the timeout of its stop function after some seconds

What did you expect to happen?

node-red and the test-helper should stop fast under 10 sec. or max. 15 sec. normally not 20 sec.

Other Information

This was solved by then "node.iiot" object, which was deleted on stop with all internal objects and timers via reset function on close.

Notes

e2e for write is working and a good template to use for inspiration https://github.com/BiancoRoyal/node-red-contrib-iiot-opcua/issues/177

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. It will be closed in 15 days, but can be saved by removing the stale label or commenting.

biancode commented 2 years ago

partial solved but more to test via e2e tests

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. It will be closed in 15 days, but can be saved by removing the stale label or commenting.