@things-factory/integration-base 6.2.39 → 6.2.40
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/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/integration-base",
|
3
|
-
"version": "6.2.
|
3
|
+
"version": "6.2.40",
|
4
4
|
"main": "dist-server/index.js",
|
5
5
|
"browser": "client/index.js",
|
6
6
|
"things-factory": true,
|
@@ -46,5 +46,5 @@
|
|
46
46
|
"devDependencies": {
|
47
47
|
"@types/cron": "^2.0.1"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "fd7decc71972d25ef12ad0f44ab19eb66c6d289b"
|
50
50
|
}
|
@@ -74,7 +74,7 @@ export class OperatoConnector implements Connector {
|
|
74
74
|
async connect(connection) {
|
75
75
|
var {
|
76
76
|
endpoint: uri,
|
77
|
-
params: { authKey, domain, subscriptionHandlers }
|
77
|
+
params: { authKey, domain, subscriptionHandlers = {} }
|
78
78
|
} = connection
|
79
79
|
|
80
80
|
if (!authKey || !domain) {
|
@@ -193,7 +193,8 @@ export class OperatoConnector implements Connector {
|
|
193
193
|
ConnectionManager.logger.info(`(${tag}:${scenarioName}) subscription closed flag: ${subscriptionObserver.closed}`)
|
194
194
|
})
|
195
195
|
|
196
|
-
|
196
|
+
client['subscriptions'] = subscriptions
|
197
|
+
ConnectionManager.addConnectionInstance(connection, client)
|
197
198
|
|
198
199
|
ConnectionManager.logger.info(
|
199
200
|
`graphql-connector connection(${connection.name}:${connection.endpoint}) is connected`
|
@@ -201,7 +202,8 @@ export class OperatoConnector implements Connector {
|
|
201
202
|
}
|
202
203
|
|
203
204
|
async disconnect(connection) {
|
204
|
-
var
|
205
|
+
var client = ConnectionManager.getConnectionInstance(connection)
|
206
|
+
let subscriptions: SubscriberData[] = client['subscriptions']
|
205
207
|
subscriptions.forEach(subscription => subscription.subscriptionObserver.unsubscribe())
|
206
208
|
client.stop()
|
207
209
|
ConnectionManager.removeConnectionInstance(connection)
|