Label: complexity: high
Points: 200
Description
Abruptly terminating a process with an active SDK instance can lose queued operations and corrupt cache state. This issue adds shutdown() that flushes pending operations, persists cache to disk, closes all connections, and resolves when cleanup is complete.
Technical Context
Involves src/client.ts. shutdown(): Promise<void> drains the operation queue, calls cache.persist() if persistence is configured, removes all event listeners, and nullifies internal references. Register process.on('SIGTERM', () => client.shutdown()) automatically when in Node.js environment.
Acceptance Criteria
Label: complexity: high
Points: 200
Description
Abruptly terminating a process with an active SDK instance can lose queued operations and corrupt cache state. This issue adds
shutdown()that flushes pending operations, persists cache to disk, closes all connections, and resolves when cleanup is complete.Technical Context
Involves
src/client.ts.shutdown(): Promise<void>drains the operation queue, callscache.persist()if persistence is configured, removes all event listeners, and nullifies internal references. Registerprocess.on('SIGTERM', () => client.shutdown())automatically when in Node.js environment.Acceptance Criteria
shutdown(): Promise<void>exported onStellarSplitClientanytypes