RPC error on player disconnected

Whenever a player disconnects the Server/Client which has an RPC in the update function will send that function to the disconnected player 1 time. How can I prevent this?

function Update() {
	if (Network.isServer || Network.isClient) {
		networkView.RPC("Sync", RPCMode.Others, transform.position, transform.rotation);//This will be sent to the player once after they have disconnected.
	}
}

If the player disconnects it wont be able to send anything to the server or other clients via RPC. You should probably use these functions “OnPlayerDisconnected”, and “OnDisconnectedFromServer”. Hopefully I’m understanding your question correctly.

/// <summary>
/// Raises the player disconnected event.
/// CALLED ON SERVER
/// </summary>
void OnPlayerDisconnected(NetworkPlayer _networkPlayer) {
	Network.RemoveRPCs(_networkPlayer);
	Network.DestroyPlayerObjects(_networkPlayer);
	Debug.Log("Removed player ("+ _networkPlayer.ipAddress +") RPC's");
}

/// <summary>
/// Raises the disconnected from server event.
/// Called on client during disconnection from server, but also on the server when the connection has disconnected.
/// CALLED ON CLIENT
/// </summary>
/// <param name="info">Info.</param>
void OnDisconnectedFromServer(NetworkDisconnection info){
	switch(info){
	case NetworkDisconnection.Disconnected:
		Debug.Log ("Disconnected");
		break;
	case NetworkDisconnection.LostConnection:
		Debug.Log ("LostConnection");
		break;
	}
}