No liability, criminal or civil, shall be imposed upon any person authorized to disperse or assist in dispersing a riot or unlawful assembly for any action of such person which was taken after those rioting or unlawfully assembled had been commanded to disperse, and which action was reasonably necessary under all the circumstances to disperse such riot or unlawful assembly or to arrest those who failed or refused to disperse.
Va. Code § 18.2-412