disconnect()

in greengrass-opcua-adapter-nodejs/subscriber.js [126:142]


    disconnect() {
        const self = this;

        self._client.disconnect(function (err) {
            if (err) {
                console.log("OPCUAClient#withClientSession: client disconnect failed ?");
                console.log('Got an error disconnecting from ', self._serverConfig.url, ' Err: ', err);
            } else {
                // Clear the timer for sending retained data as well if enable the custom strategy.
                if (self._customConfig.customUploadDataStrategy.enableStrategy) {
                    clearTimeout(timeoutObj);
                }

                self.emit('disconnect');
            }
        });
    }