The Lichtenbaum-Hartshorne theorem for generalized local cohomology and connectedness