---
title: disconnect()
framework: Foveated Streaming
role: symbol
role_heading: Instance Method
platforms: [visionOS 27.0+]
path: foveatedstreaming/foveatedstreamingextension/disconnect()
---

# disconnect()

Disconnect from the streaming endpoint.

## Declaration

```swift
@MainActor func disconnect() async throws
```

## Discussion

Discussion This method should cleanly shut down the streaming connection and release any associated resources. This function will be called exactly once for the lifetime of the process. warning: If the disconnect does not complete within a reasonable time, the process will be forcefully terminated. note: If the disconnect does not complete cleanly.  The error will be presented to the host app.
