# Leaving The Lobby

Leaving the lobby is exactly the **same as leaving a match**. Simply use the `LeaveKronosMatch` node and the player will disconnect from the game. The session will be cleaned up automatically. If called on the hosting player, all clients will be gracefully disconnected before closing the game.

There is no hard requirement on where you need to call this from. Most games will probably have this hooked to the `OnClicked` event of a widget button.

{% tabs %}
{% tab title="Blueprint" %}
<figure><img src="https://3833329260-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfIkwZ5xO6YLccFyQBEgv%2Fuploads%2FYRmn3NrZvel6Yxrr7phn%2FLeaveLobby.jpg?alt=media&#x26;token=8d72ae2a-a7c2-44e9-aa28-107e4141a5ee" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="C++" %}
```cpp
#include "KronosOnlineSession.h"
```

```cpp
UKronosOnlineSession* OnlineSession = UKronosOnlineSession::Get(this);
OnlineSession->LeaveGameSession();
```
{% endtab %}
{% endtabs %}

{% hint style="info" %}
The `OnComplete` event is called when the leave has been requested so at that time the player is still in the match (disconnecting in the next frame).
{% endhint %}
