We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d5d8fc commit 0892465Copy full SHA for 0892465
1 file changed
packages/sdk/node-client/src/NodeClient.ts
@@ -107,9 +107,9 @@ export class NodeClient extends LDClientImpl {
107
const dataManager = this.dataManager as NodeDataManager;
108
try {
109
if (mode === 'offline') {
110
- // Disable analytics, then drain any queued events before tearing down the data source.
111
- this.setEventSendingEnabled(false, false);
+ // Drain any queued events before closing the event processor and tearing down the data source.
112
await this.flush();
+ this.setEventSendingEnabled(false, false);
113
}
114
await dataManager.setConnectionMode(mode);
115
} finally {
0 commit comments