detect closed clients