If the subscription limit of the OPC-UA was reached, an uncaught error would be raised, stopping Node-RED completely. Then, Node-RED would fail to start again (if set to restart on errors), since the amount of subscriptions is likely the same. Now, whenever there's an error on the subscription, it will be reported but Node-RED will continue working. Example of the new handling working:
Gracefully close sessions (commit 809f458...)
When Node-RED was stopped, the node.on("close") handler wasn't waiting for all the flows to finish their tasks before closing Node-RED. If more than one flow had active OPC-UA sessions, some of them could be left open on the server. Now, the session.close() is awaited and the done() function is called in the end of the node.on("close") handler.
In this PR, two enhancements are introduced.
Subscription error handling (
commit 2b75755...
)If the subscription limit of the OPC-UA was reached, an uncaught error would be raised, stopping Node-RED completely. Then, Node-RED would fail to start again (if set to restart on errors), since the amount of subscriptions is likely the same. Now, whenever there's an error on the subscription, it will be reported but Node-RED will continue working. Example of the new handling working:
Gracefully close sessions (
commit 809f458...
)When Node-RED was stopped, the
node.on("close")
handler wasn't waiting for all the flows to finish their tasks before closing Node-RED. If more than one flow had active OPC-UA sessions, some of them could be left open on the server. Now, thesession.close()
is awaited and thedone()
function is called in the end of thenode.on("close")
handler.