---
title: "Client.reconnect() | Grafana k6 documentation"
description: "Reconnect to the MQTT broker"
---

# Client.reconnect()

Attempts to reconnect to the MQTT broker using the same connection parameters as the last successful connection.

## Signature

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

```javascript
client.reconnect()
```
