if EM is already running, only the vonnection will be closed