detects closed clients