Quick answer: Godot 4 multiplayer peer disconnect canceling an in-flight RPC and crashing? Disconnect frees the peer; pending RPCs reference freed peer - cancel cleanly.

Server kicks a client; subsequent RPC to the kicked client crashes the server.

Validate peer before RPC

Check multiplayer.get_peers().has(peer_id) before sending.

Or wrap RPC calls

Helper that catches the disconnect path; logs; returns false on no-peer.

Audit RPC senders

Each RPC's pre-flight check. Defensive.

“Peer lifecycle is asynchronous. RPC code must handle the race.”

Build a SafeRPC wrapper. Validates peers; logs failures; doesn't crash.

Related reading