fix c# endpoint concurrent connect problem