Clear the array only when first socket connects