pub async fn wait_or_shutdown<F, E>(
    shutdown_tx: ShutdownSender,
    future2: F
) -> Result<(), E>where
    F: Future<Output = Result<(), E>>,