Try to establish a connection before returning the handle.