---
title: "Client.endAsync( [options] ) | Grafana k6 documentation"
description: "Disconnect from the MQTT broker asynchronously"
---

# Client.endAsync()

Disconnect from the broker asynchronously. Returns a promise that resolves when the disconnection is complete.

## Signature

JavaScript ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```javascript
await client.endAsync(options)
```

## Parameters

Expand table

| Parameter    | Type   | Description                               |
|--------------|--------|-------------------------------------------|
| options      | object | Optional disconnect configuration         |
| options.tags | object | Custom tags for metrics (key-value pairs) |

## Returns

A promise that resolves when the client is successfully disconnected.
