shutdownRpc()
function shutdownRpc(): void;Defined in: src/lib/rpc/index.ts:197
Shutdown the RPC system.
This function:
- Rejects all pending RPC calls with a shutdown error
- Removes all handlers from the map (listeners become no-ops)
- Disposes response listener tracking
- Removes the global RPC interface
Important Notes
- FiveM's underlying event listeners remain registered until resource stops
- After shutdown, incoming RPC requests are silently ignored (handlers not found)
- This is safe because FiveM automatically cleans up all handlers on resource stop
Returns
void