let disconnect function handle alert