> For the complete documentation index, see [llms.txt](https://obytejs.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://obytejs.com/0.1.17/utils/keep-connection-alive.md).

# Keep connection alive

### Reconnect

You can enable auto reconnection with the option "reconnect".

```javascript
const options = { reconnect: true };
const client = new obyte.Client('wss://obyte.org/bb', options);
```

### Notify

Another way to keep the connection with the WebSocket node alive is to notify the node that your peer is awake every 10 sec.&#x20;

```javascript
setInterval(function() {
  client.api.heartbeat()
}, 10 * 1000);
```
