This should fix almost all issues when the testing is in progress and the array is changed. However, there might be uncovered edge cases since the vmess array is in both process and accessed by multiple threads.