Skip to main content

disconnect()

The disconnect() method gracefully terminates your active sandbox session by closing the WebSocket connection and releasing all associated resources.

disconnect()

Description: Gracefully terminates your active sandbox. Parameters: None Returns: Promise<void> - Resolves when disconnection is complete Example:
const sandbox = new Sandbox({ apiKey: 'key' })
await sandbox.create({ shouldBackupFilesystem: false })

// Do work...

// Always cleanup
await sandbox.disconnect()