What's the best way to disconnect from the server as a client?

Godot Version

4.6.stable

Question

I’m wondering what the best way to disconnect intentionally, as a client, from the server is.

This is what I’ve tried:
multiplayer.multiplayer_peer.disconnect_peer(1)

When I disconnect using this method, it works but gives me the error:

send: Unable to send packet on channel 1, max channels: 0

I’m sure there’s some simple solution that I just haven’t found.

Thanks for the help!