more checks for a closed socket