node-opcua-client 2.183.1 → 2.184.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alarms_and_conditions/client_alarm_tools.d.ts +1 -0
- package/dist/alarms_and_conditions/client_alarm_tools.d.ts.map +1 -0
- package/dist/alarms_and_conditions/client_alarm_tools.js +23 -27
- package/dist/alarms_and_conditions/client_alarm_tools.js.map +1 -1
- package/dist/alarms_and_conditions/client_tools.d.ts +1 -0
- package/dist/alarms_and_conditions/client_tools.d.ts.map +1 -0
- package/dist/alarms_and_conditions/client_tools.js +17 -19
- package/dist/alarms_and_conditions/client_tools.js.map +1 -1
- package/dist/client_base.d.ts +1 -0
- package/dist/client_base.d.ts.map +1 -0
- package/dist/client_base.js +3 -6
- package/dist/client_base.js.map +1 -1
- package/dist/client_monitored_item.d.ts +1 -0
- package/dist/client_monitored_item.d.ts.map +1 -0
- package/dist/client_monitored_item.js +4 -7
- package/dist/client_monitored_item.js.map +1 -1
- package/dist/client_monitored_item_base.d.ts +1 -0
- package/dist/client_monitored_item_base.d.ts.map +1 -0
- package/dist/client_monitored_item_base.js +1 -2
- package/dist/client_monitored_item_group.d.ts +1 -0
- package/dist/client_monitored_item_group.d.ts.map +1 -0
- package/dist/client_monitored_item_group.js +2 -5
- package/dist/client_monitored_item_group.js.map +1 -1
- package/dist/client_monitored_item_toolbox.d.ts +1 -0
- package/dist/client_monitored_item_toolbox.d.ts.map +1 -0
- package/dist/client_monitored_item_toolbox.js +21 -27
- package/dist/client_monitored_item_toolbox.js.map +1 -1
- package/dist/client_session.d.ts +2 -1
- package/dist/client_session.d.ts.map +1 -0
- package/dist/client_session.js +2 -7
- package/dist/client_session.js.map +1 -1
- package/dist/client_session_keepalive_manager.d.ts +1 -0
- package/dist/client_session_keepalive_manager.d.ts.map +1 -0
- package/dist/client_session_keepalive_manager.js +24 -31
- package/dist/client_session_keepalive_manager.js.map +1 -1
- package/dist/client_subscription.d.ts +1 -0
- package/dist/client_subscription.d.ts.map +1 -0
- package/dist/client_subscription.js +1 -5
- package/dist/client_subscription.js.map +1 -1
- package/dist/client_utils.d.ts +1 -0
- package/dist/client_utils.d.ts.map +1 -0
- package/dist/client_utils.js +7 -10
- package/dist/client_utils.js.map +1 -1
- package/dist/common.d.ts +1 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +1 -2
- package/dist/common.js.map +1 -1
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -118
- package/dist/index.js.map +1 -1
- package/dist/opcua_client.d.ts +1 -0
- package/dist/opcua_client.d.ts.map +1 -0
- package/dist/opcua_client.js +6 -10
- package/dist/opcua_client.js.map +1 -1
- package/dist/private/client_base_impl.d.ts +1 -0
- package/dist/private/client_base_impl.d.ts.map +1 -0
- package/dist/private/client_base_impl.js +146 -150
- package/dist/private/client_base_impl.js.map +1 -1
- package/dist/private/client_monitored_item_base_impl.d.ts +1 -0
- package/dist/private/client_monitored_item_base_impl.d.ts.map +1 -0
- package/dist/private/client_monitored_item_base_impl.js +1 -2
- package/dist/private/client_monitored_item_base_impl.js.map +1 -1
- package/dist/private/client_monitored_item_group_impl.d.ts +1 -0
- package/dist/private/client_monitored_item_group_impl.d.ts.map +1 -0
- package/dist/private/client_monitored_item_group_impl.js +31 -35
- package/dist/private/client_monitored_item_group_impl.js.map +1 -1
- package/dist/private/client_monitored_item_impl.d.ts +1 -0
- package/dist/private/client_monitored_item_impl.d.ts.map +1 -0
- package/dist/private/client_monitored_item_impl.js +41 -45
- package/dist/private/client_monitored_item_impl.js.map +1 -1
- package/dist/private/client_publish_engine.d.ts +1 -0
- package/dist/private/client_publish_engine.d.ts.map +1 -0
- package/dist/private/client_publish_engine.js +47 -54
- package/dist/private/client_publish_engine.js.map +1 -1
- package/dist/private/client_session_impl.d.ts +1 -0
- package/dist/private/client_session_impl.d.ts.map +1 -0
- package/dist/private/client_session_impl.js +231 -238
- package/dist/private/client_session_impl.js.map +1 -1
- package/dist/private/client_subscription_impl.d.ts +1 -0
- package/dist/private/client_subscription_impl.d.ts.map +1 -0
- package/dist/private/client_subscription_impl.js +93 -102
- package/dist/private/client_subscription_impl.js.map +1 -1
- package/dist/private/i_private_client.d.ts +1 -0
- package/dist/private/i_private_client.d.ts.map +1 -0
- package/dist/private/i_private_client.js +1 -2
- package/dist/private/opcua_client_impl.d.ts +1 -0
- package/dist/private/opcua_client_impl.d.ts.map +1 -0
- package/dist/private/opcua_client_impl.js +138 -145
- package/dist/private/opcua_client_impl.js.map +1 -1
- package/dist/private/performance.d.ts +1 -0
- package/dist/private/performance.d.ts.map +1 -0
- package/dist/private/performance.js +1 -4
- package/dist/private/performance.js.map +1 -1
- package/dist/private/reconnection/client_publish_engine_reconnection.d.ts +1 -0
- package/dist/private/reconnection/client_publish_engine_reconnection.d.ts.map +1 -0
- package/dist/private/reconnection/client_publish_engine_reconnection.js +28 -34
- package/dist/private/reconnection/client_publish_engine_reconnection.js.map +1 -1
- package/dist/private/reconnection/client_reconnection.d.ts +1 -0
- package/dist/private/reconnection/client_reconnection.d.ts.map +1 -0
- package/dist/private/reconnection/client_reconnection.js +1 -4
- package/dist/private/reconnection/client_reconnection.js.map +1 -1
- package/dist/private/reconnection/client_subscription_reconnection.d.ts +1 -0
- package/dist/private/reconnection/client_subscription_reconnection.d.ts.map +1 -0
- package/dist/private/reconnection/client_subscription_reconnection.js +25 -31
- package/dist/private/reconnection/client_subscription_reconnection.js.map +1 -1
- package/dist/private/reconnection/reconnection.d.ts +1 -0
- package/dist/private/reconnection/reconnection.d.ts.map +1 -0
- package/dist/private/reconnection/reconnection.js +50 -59
- package/dist/private/reconnection/reconnection.js.map +1 -1
- package/dist/reverse/client_reverse_connect.d.ts +1 -0
- package/dist/reverse/client_reverse_connect.d.ts.map +1 -0
- package/dist/reverse/client_reverse_connect.js +20 -24
- package/dist/reverse/client_reverse_connect.js.map +1 -1
- package/dist/tools/findservers.d.ts +1 -0
- package/dist/tools/findservers.d.ts.map +1 -0
- package/dist/tools/findservers.js +7 -13
- package/dist/tools/findservers.js.map +1 -1
- package/dist/tools/read_history_server_capabilities.d.ts +1 -0
- package/dist/tools/read_history_server_capabilities.d.ts.map +1 -0
- package/dist/tools/read_history_server_capabilities.js +13 -16
- package/dist/tools/read_history_server_capabilities.js.map +1 -1
- package/dist/user_identity_info.d.ts +2 -1
- package/dist/user_identity_info.d.ts.map +1 -0
- package/dist/user_identity_info.js +1 -2
- package/dist/verify.d.ts +1 -0
- package/dist/verify.d.ts.map +1 -0
- package/dist/verify.js +15 -19
- package/dist/verify.js.map +1 -1
- package/package.json +48 -47
- package/source/alarms_and_conditions/client_alarm_tools.ts +1 -1
- package/source/client_monitored_item_toolbox.ts +1 -1
- package/source/client_session.ts +1 -1
- package/source/index.ts +5 -3
- package/source/private/client_base_impl.ts +5 -2
- package/source/private/client_publish_engine.ts +16 -16
- package/source/private/client_subscription_impl.ts +1 -1
- package/source/private/opcua_client_impl.ts +4 -4
- package/source/private/reconnection/client_publish_engine_reconnection.ts +7 -7
- package/source/private/reconnection/client_subscription_reconnection.ts +5 -5
- package/source/private/reconnection/reconnection.ts +3 -3
- package/source/reverse/client_reverse_connect.ts +1 -1
- package/source/user_identity_info.ts +1 -1
|
@@ -130,7 +130,7 @@ export class ClientSidePublishEngine {
|
|
|
130
130
|
* @private
|
|
131
131
|
*/
|
|
132
132
|
public terminate(): void {
|
|
133
|
-
|
|
133
|
+
/* c8 ignore next */
|
|
134
134
|
doDebug && debugLog("Terminated ClientPublishEngine ");
|
|
135
135
|
this.session = null;
|
|
136
136
|
}
|
|
@@ -139,7 +139,7 @@ export class ClientSidePublishEngine {
|
|
|
139
139
|
* @private
|
|
140
140
|
*/
|
|
141
141
|
public registerSubscription(subscription: ClientSubscription): void {
|
|
142
|
-
|
|
142
|
+
/* c8 ignore next */
|
|
143
143
|
doDebug && debugLog("ClientSidePublishEngine#registerSubscription ", subscription.subscriptionId);
|
|
144
144
|
|
|
145
145
|
const _subscription = subscription as ClientSubscriptionImpl;
|
|
@@ -153,7 +153,7 @@ export class ClientSidePublishEngine {
|
|
|
153
153
|
|
|
154
154
|
this.timeoutHint = Math.min(Math.max(this.timeoutHint, subscription.timeoutHint), 0x7ffffff);
|
|
155
155
|
|
|
156
|
-
|
|
156
|
+
/* c8 ignore next */
|
|
157
157
|
doDebug && debugLog(" setting timeoutHint = ", this.timeoutHint, subscription.timeoutHint);
|
|
158
158
|
|
|
159
159
|
this.replenish_publish_request_queue();
|
|
@@ -183,7 +183,7 @@ export class ClientSidePublishEngine {
|
|
|
183
183
|
* @private
|
|
184
184
|
*/
|
|
185
185
|
public unregisterSubscription(subscriptionId: SubscriptionId): void {
|
|
186
|
-
|
|
186
|
+
/* c8 ignore next */
|
|
187
187
|
doDebug && debugLog("ClientSidePublishEngine#unregisterSubscription ", subscriptionId);
|
|
188
188
|
|
|
189
189
|
assert(Number.isFinite(subscriptionId) && subscriptionId > 0);
|
|
@@ -194,7 +194,7 @@ export class ClientSidePublishEngine {
|
|
|
194
194
|
if (Object.hasOwn(this.subscriptionMap, subscriptionId)) {
|
|
195
195
|
delete this.subscriptionMap[subscriptionId];
|
|
196
196
|
} else {
|
|
197
|
-
|
|
197
|
+
/* c8 ignore next */
|
|
198
198
|
doDebug && debugLog("ClientSidePublishEngine#unregisterSubscription cannot find subscription ", subscriptionId);
|
|
199
199
|
}
|
|
200
200
|
}
|
|
@@ -225,7 +225,7 @@ export class ClientSidePublishEngine {
|
|
|
225
225
|
|
|
226
226
|
this.nbPendingPublishRequests += 1;
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
/* c8 ignore next */
|
|
229
229
|
doDebug && debugLog(chalk.yellow("sending publish request "), this.nbPendingPublishRequests);
|
|
230
230
|
|
|
231
231
|
const subscriptionAcknowledgements = this.subscriptionAcknowledgements;
|
|
@@ -285,7 +285,7 @@ export class ClientSidePublishEngine {
|
|
|
285
285
|
}
|
|
286
286
|
|
|
287
287
|
if (err) {
|
|
288
|
-
|
|
288
|
+
/* c8 ignore next */
|
|
289
289
|
if (doDebug) {
|
|
290
290
|
debugLog(
|
|
291
291
|
chalk.cyan("ClientSidePublishEngine.prototype.internalSendPublishRequest callback : "),
|
|
@@ -295,7 +295,7 @@ export class ClientSidePublishEngine {
|
|
|
295
295
|
}
|
|
296
296
|
|
|
297
297
|
if (err.message.match("not connected")) {
|
|
298
|
-
|
|
298
|
+
/* c8 ignore next */
|
|
299
299
|
if (doDebug) {
|
|
300
300
|
debugLog(
|
|
301
301
|
chalk.bgWhite.red(" WARNING : CLIENT IS NOT CONNECTED :" + " MAY BE RECONNECTION IS IN PROGRESS")
|
|
@@ -307,13 +307,13 @@ export class ClientSidePublishEngine {
|
|
|
307
307
|
// There is no need to send more publish request for the time being until reconnection is completed
|
|
308
308
|
active = false;
|
|
309
309
|
}
|
|
310
|
-
|
|
310
|
+
/* c8 ignore next */
|
|
311
311
|
if (err.message.match(/BadNoSubscription/) && this.activeSubscriptionCount >= 1) {
|
|
312
312
|
// there is something wrong happening here.
|
|
313
313
|
// the server tells us that there is no subscription for this session
|
|
314
314
|
// but the client have some active subscription left.
|
|
315
315
|
// This could happen if the client has missed or not received the StatusChange Notification
|
|
316
|
-
|
|
316
|
+
/* c8 ignore next */
|
|
317
317
|
if (doDebug) {
|
|
318
318
|
debugLog(chalk.bgWhite.red(" WARNING: server tells that there is no Subscription, but client disagree"));
|
|
319
319
|
debugLog("this.activeSubscriptionCount =", this.activeSubscriptionCount);
|
|
@@ -327,7 +327,7 @@ export class ClientSidePublishEngine {
|
|
|
327
327
|
// may be the session timeout is shorted than the subscription life time
|
|
328
328
|
// and the client does not send intermediate keepAlive request to keep the connection working.
|
|
329
329
|
//
|
|
330
|
-
|
|
330
|
+
/* c8 ignore next */
|
|
331
331
|
if (doDebug) {
|
|
332
332
|
debugLog(chalk.bgWhite.red(" WARNING : Server tells that the session has closed ..."));
|
|
333
333
|
debugLog(
|
|
@@ -364,7 +364,7 @@ export class ClientSidePublishEngine {
|
|
|
364
364
|
// completed the session transfer. We should pause and let the
|
|
365
365
|
// reconnection flow replenish publish requests once the session
|
|
366
366
|
// transfer completes.
|
|
367
|
-
|
|
367
|
+
/* c8 ignore next */
|
|
368
368
|
doDebug &&
|
|
369
369
|
debugLog(
|
|
370
370
|
chalk.bgWhite.yellow(
|
|
@@ -374,7 +374,7 @@ export class ClientSidePublishEngine {
|
|
|
374
374
|
active = false;
|
|
375
375
|
}
|
|
376
376
|
} else if (response) {
|
|
377
|
-
|
|
377
|
+
/* c8 ignore next */
|
|
378
378
|
if (doDebug) {
|
|
379
379
|
debugLog(chalk.cyan("ClientSidePublishEngine.prototype.internalSendPublishRequest callback "));
|
|
380
380
|
}
|
|
@@ -393,7 +393,7 @@ export class ClientSidePublishEngine {
|
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
private _receive_publish_response(response: PublishResponse) {
|
|
396
|
-
|
|
396
|
+
/* c8 ignore next */
|
|
397
397
|
doDebug && debugLog(chalk.yellow("receive publish response"));
|
|
398
398
|
|
|
399
399
|
// the id of the subscription sending the notification message
|
|
@@ -429,14 +429,14 @@ export class ClientSidePublishEngine {
|
|
|
429
429
|
// delegate notificationData to the subscription callback
|
|
430
430
|
subscription.onNotificationMessage(notificationMessage);
|
|
431
431
|
} catch (err) {
|
|
432
|
-
|
|
432
|
+
/* c8 ignore next */
|
|
433
433
|
if (doDebug) {
|
|
434
434
|
debugLog(err);
|
|
435
435
|
debugLog("Exception in onNotificationMessage");
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
} else {
|
|
439
|
-
|
|
439
|
+
/* c8 ignore next */
|
|
440
440
|
if (doDebug) {
|
|
441
441
|
debugLog(" ignoring notificationMessage", notificationMessage, " for subscription", subscriptionId);
|
|
442
442
|
debugLog(" because there is no subscription.");
|
|
@@ -66,7 +66,7 @@ const minimumMaxKeepAliveCount = 3;
|
|
|
66
66
|
function displayKeepAliveWarning(sessionTimeout: number, maxKeepAliveCount: number, publishingInterval: number): boolean {
|
|
67
67
|
const keepAliveInterval = maxKeepAliveCount * publishingInterval;
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
/* c8 ignore next */
|
|
70
70
|
if (sessionTimeout < keepAliveInterval) {
|
|
71
71
|
warningLog(
|
|
72
72
|
chalk.yellowBright(
|
|
@@ -216,7 +216,7 @@ async function createX509IdentityToken(
|
|
|
216
216
|
const endpoint = context.endpoint;
|
|
217
217
|
assert(endpoint instanceof EndpointDescription);
|
|
218
218
|
const userTokenPolicy = findUserTokenPolicy(endpoint, UserTokenType.Certificate);
|
|
219
|
-
|
|
219
|
+
/* c8 ignore next */
|
|
220
220
|
if (!userTokenPolicy) {
|
|
221
221
|
throw new Error("Cannot find Certificate (X509) user token policy in end point description");
|
|
222
222
|
}
|
|
@@ -240,7 +240,7 @@ async function createX509IdentityToken(
|
|
|
240
240
|
// see Release 1.02 155 OPC Unified Architecture, Part 4
|
|
241
241
|
const cryptoFactory = getCryptoFactory(securityPolicy);
|
|
242
242
|
|
|
243
|
-
|
|
243
|
+
/* c8 ignore next */
|
|
244
244
|
if (!cryptoFactory) {
|
|
245
245
|
throw new Error(" Unsupported security Policy");
|
|
246
246
|
}
|
|
@@ -308,7 +308,7 @@ function createUserNameIdentityToken(
|
|
|
308
308
|
*/
|
|
309
309
|
const userTokenPolicy = findUserTokenPolicy(endpoint, UserTokenType.UserName);
|
|
310
310
|
|
|
311
|
-
|
|
311
|
+
/* c8 ignore next */
|
|
312
312
|
if (!userTokenPolicy) {
|
|
313
313
|
throw new Error("Cannot find USERNAME user token policy in end point description");
|
|
314
314
|
}
|
|
@@ -359,7 +359,7 @@ function createUserNameIdentityToken(
|
|
|
359
359
|
// see Release 1.02 155 OPC Unified Architecture, Part 4
|
|
360
360
|
const cryptoFactory = getCryptoFactory(securityPolicy);
|
|
361
361
|
|
|
362
|
-
|
|
362
|
+
/* c8 ignore next */
|
|
363
363
|
if (!cryptoFactory) {
|
|
364
364
|
throw new Error(` Unsupported security Policy ${securityPolicy.toString()}`);
|
|
365
365
|
}
|
|
@@ -48,9 +48,9 @@ function _sendRepublish(session: ClientSessionImpl, subscription: ClientSubscrip
|
|
|
48
48
|
subscriptionId: subscription.subscriptionId
|
|
49
49
|
});
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
/* c8 ignore next */
|
|
52
52
|
if (doDebug) {
|
|
53
|
-
|
|
53
|
+
/* c8 ignore next */
|
|
54
54
|
debugLog(
|
|
55
55
|
chalk.bgCyan.yellow.bold(" republish Request for subscription"),
|
|
56
56
|
request.subscriptionId,
|
|
@@ -60,7 +60,7 @@ function _sendRepublish(session: ClientSessionImpl, subscription: ClientSubscrip
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
if (!session || session._closeEventHasBeenEmitted) {
|
|
63
|
-
|
|
63
|
+
/* c8 ignore next */
|
|
64
64
|
doDebug && debugLog("ClientPublishEngine#_republish aborted ");
|
|
65
65
|
return resolve({ isDone: true });
|
|
66
66
|
}
|
|
@@ -87,7 +87,7 @@ function _sendRepublish(session: ClientSessionImpl, subscription: ClientSubscrip
|
|
|
87
87
|
if (!err) {
|
|
88
88
|
err = new Error(response.responseHeader.serviceResult.toString());
|
|
89
89
|
}
|
|
90
|
-
|
|
90
|
+
/* c8 ignore next */
|
|
91
91
|
doDebug && debugLog(" _send_republish ends with ", err.message);
|
|
92
92
|
reject(err);
|
|
93
93
|
});
|
|
@@ -106,7 +106,7 @@ async function _republish(engine: ClientSidePublishEngine, subscription: ClientS
|
|
|
106
106
|
isDone = result.isDone;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
|
|
109
|
+
/* c8 ignore next */
|
|
110
110
|
if (doDebug) {
|
|
111
111
|
debugLog("nbPendingPublishRequest = ", engine.nbPendingPublishRequests);
|
|
112
112
|
debugLog(" _republish ends with ", "null");
|
|
@@ -127,7 +127,7 @@ async function __askSubscriptionRepublish(engine: ClientSidePublishEngine, subsc
|
|
|
127
127
|
|
|
128
128
|
const error = err as Error;
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
/* c8 ignore next */
|
|
131
131
|
doDebug && debugLog("__askSubscriptionRepublish--------------------- err =", error.message);
|
|
132
132
|
|
|
133
133
|
if (error.message.match(/BadSessionInvalid/)) {
|
|
@@ -144,7 +144,7 @@ async function __askSubscriptionRepublish(engine: ClientSidePublishEngine, subsc
|
|
|
144
144
|
// In this case, Client must recreate a subscription and recreate monitored item without altering
|
|
145
145
|
// the event handlers
|
|
146
146
|
//
|
|
147
|
-
|
|
147
|
+
/* c8 ignore next */
|
|
148
148
|
doDebug &&
|
|
149
149
|
debugLog(
|
|
150
150
|
chalk.bgWhite.red("__askSubscriptionRepublish failed " + " subscriptionId is not valid anymore on server side.")
|
|
@@ -43,12 +43,12 @@ async function adjustMonitoredItemNodeIds(_subscription: ClientSubscription, _ol
|
|
|
43
43
|
|
|
44
44
|
*/
|
|
45
45
|
export async function recreateSubscriptionAndMonitoredItem(_subscription: ClientSubscription): Promise<void> {
|
|
46
|
-
|
|
46
|
+
/* c8 ignore next */
|
|
47
47
|
doDebug && debugLog("recreateSubscriptionAndMonitoredItem", _subscription.subscriptionId.toString());
|
|
48
48
|
|
|
49
49
|
const subscription = _subscription as ClientSubscriptionImpl;
|
|
50
50
|
if (subscription.subscriptionId === TERMINATED_SUBSCRIPTION_ID) {
|
|
51
|
-
|
|
51
|
+
/* c8 ignore next */
|
|
52
52
|
doDebug && debugLog("Subscription is not in a valid state");
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
@@ -71,7 +71,7 @@ export async function recreateSubscriptionAndMonitoredItem(_subscription: Client
|
|
|
71
71
|
|
|
72
72
|
const _test = subscription.publishEngine.getSubscription(subscription.subscriptionId);
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
/* c8 ignore next */
|
|
75
75
|
doDebug && debugLog("recreating ", Object.keys(oldMonitoredItems).length, " monitored Items");
|
|
76
76
|
// re-create monitored items
|
|
77
77
|
const itemsToCreate: MonitoredItemCreateRequestOptions[] = [];
|
|
@@ -94,12 +94,12 @@ export async function recreateSubscriptionAndMonitoredItem(_subscription: Client
|
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
const session = subscription.session;
|
|
97
|
-
|
|
97
|
+
/* c8 ignore next */
|
|
98
98
|
if (!session) {
|
|
99
99
|
throw new Error("no session");
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
|
|
102
|
+
/* c8 ignore next */
|
|
103
103
|
doDebug && debugLog("Recreating ", itemsToCreate.length, " monitored items");
|
|
104
104
|
|
|
105
105
|
const response = await createMonitoredItemsAndRespectOperationalLimits(session, createMonitorItemsRequest);
|
|
@@ -213,7 +213,7 @@ function activate_session(client: IClientBase, session: ClientSessionImpl, newSe
|
|
|
213
213
|
return;
|
|
214
214
|
}
|
|
215
215
|
client._activateSession(newSession, newSession.userIdentityInfo, (err: Error | null, _session1?: ClientSessionImpl) => {
|
|
216
|
-
|
|
216
|
+
/* c8 ignore next */
|
|
217
217
|
doDebug && debugLog(" => activating a new session .... Done err=", err ? err.message : "null");
|
|
218
218
|
if (err) {
|
|
219
219
|
doDebug &&
|
|
@@ -231,9 +231,9 @@ function activate_session(client: IClientBase, session: ClientSessionImpl, newSe
|
|
|
231
231
|
if (err2) {
|
|
232
232
|
warningLog("closing session", err2.message);
|
|
233
233
|
}
|
|
234
|
-
|
|
234
|
+
/* c8 ignore next */
|
|
235
235
|
doDebug && debugLog("the temporary replacement session is now closed");
|
|
236
|
-
|
|
236
|
+
/* c8 ignore next */
|
|
237
237
|
doDebug && debugLog(" err ", err.message, "propagated upwards");
|
|
238
238
|
reject(err);
|
|
239
239
|
});
|
|
@@ -140,7 +140,7 @@ export class ClientReverseConnect {
|
|
|
140
140
|
// listen() (e.g. EMFILE/ENFILE on accept). Without a listener Node throws an uncaught
|
|
141
141
|
// exception and crashes the process, so keep one attached for the server's whole life.
|
|
142
142
|
const onServerError = (err: Error) => {
|
|
143
|
-
|
|
143
|
+
/* c8 ignore next */
|
|
144
144
|
warningLog(`ClientReverseConnect server error: ${err.message}`);
|
|
145
145
|
};
|
|
146
146
|
server.on("error", onServerError);
|