You need to keep only one instance of IPEndPoint
and only update the Port
when you want to instantiate a new UdpClient
Something like:
private static IPEndPoint _listeningEndPoint = null;
public FeedbackListener( int feedbackPort )
{
if ( _listeningEndPoint == null)
{
_listeningEndPoint = new IPEndPoint( IPAddress.Any, feedbackport);
}
else
{
_listeningEndPoint.Port = feedbackport;
}
}