liminal-server 0.25.4

Standalone server for the liminal messaging bus
Documentation
use super::LiminalConnectionServices;
use crate::ServerError;

impl LiminalConnectionServices {
    pub(super) fn finish_background_work(&self) -> Result<(), ServerError> {
        self.participant_warm.as_ref().map_or(Ok(()), |warm| {
            warm.join().map_err(|error| ServerError::ListenerAccept {
                message: format!("participant warm shutdown failed: {error}"),
            })
        })
    }

    pub(super) fn release_holders(&self) -> Result<(), ServerError> {
        let drainer = self
            .signals
            .streams()
            .map_or(Ok(()), |streams| streams.stop());
        self.conversation_supervisor.shutdown();
        self.cluster.supervisor().shutdown();
        drainer
    }
}