Close client in the try block.

Not a great reason for this change but the previous _is_up version
did not have the running out of file handles issue during the
loop, and the _nengines implementation does.