@5minds/node-red-contrib-processcube 1.5.2-feature-fcaf4b-m3hagv0j → 1.5.2-feature-8f4ce8-m3igte5w
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -46,12 +46,16 @@ module.exports = function (RED) {
|
|
46
46
|
|
47
47
|
node.url = newUrl;
|
48
48
|
if (node.credentials.clientId && node.credentials.clientSecret) {
|
49
|
-
this.engineClient
|
49
|
+
if (this.engineClient) {
|
50
|
+
this.engineClient.dispose();
|
51
|
+
}
|
50
52
|
node.engineClient = new engine_client.EngineClient(node.url, () =>
|
51
53
|
getFreshIdentity(node.url, node)
|
52
54
|
);
|
53
55
|
} else {
|
54
|
-
this.engineClient
|
56
|
+
if (this.engineClient) {
|
57
|
+
this.engineClient.dispose();
|
58
|
+
}
|
55
59
|
node.engineClient = new engine_client.EngineClient(node.url);
|
56
60
|
}
|
57
61
|
}
|
@@ -105,9 +109,7 @@ module.exports = function (RED) {
|
|
105
109
|
|
106
110
|
return freshIdentity;
|
107
111
|
} catch (e) {
|
108
|
-
|
109
|
-
node.error('Could not get fresh identity');
|
110
|
-
node.error(e);
|
112
|
+
node.error(`Could not get fresh identity: ${e}`);
|
111
113
|
}
|
112
114
|
}
|
113
115
|
|