> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes. # disconnect > Disconnects the WebSocket and tears down the current session. ```ts disconnect(): Promise ``` Disconnects the WebSocket and tears down the current session. Ends the session and clears its persisted resume state (authorization state and protocol) and attach records together, so a later [`connect`](/docs/browser-sdk/v4/reference/signalwire/connect) with the same credentials starts a fresh session and cannot reattach to the ended session's calls. Credentials and device preferences are preserved — use [`resetToDefaults`](/docs/browser-sdk/v4/reference/signalwire/reset-to-defaults) for a full wipe. To temporarily stop receiving inbound calls while keeping the session alive, use [`unregister`](/docs/browser-sdk/v4/reference/signalwire/unregister) instead. The client can be reconnected by calling [`connect`](/docs/browser-sdk/v4/reference/signalwire/connect) again, which creates a fresh transport and session. ## **Examples** ```ts await client.disconnect(); ``` > Disconnects the WebSocket and tears down the current session.