MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / restart_detached_service

Function restart_detached_service

packages/server/src/main.rs:2714–2734  ·  view source on GitHub ↗
(options: ServiceLaunchOptions)

Source from the content-addressed store, hash-verified

2712}
2713
2714fn restart_detached_service(options: ServiceLaunchOptions) -> anyhow::Result<()> {
2715 if service::active()?.is_some() {
2716 return service::restart(ServiceOptions {
2717 port: options.port,
2718 bind: options.bind,
2719 advertise_host: options.advertise_host,
2720 client_root: options.client_root,
2721 video_codec: options.video_codec,
2722 android_gpu: options.android_gpu,
2723 low_latency: options.low_latency,
2724 stream_quality_profile: options.stream_quality_profile,
2725 local_stream_fps: options.local_stream_fps,
2726 access_token: None,
2727 pairing_code: None,
2728 });
2729 }
2730 if let Some(metadata) = read_service_metadata()? {
2731 terminate_service_metadata(&metadata)?;
2732 }
2733 start_detached_service(options)
2734}
2735
2736fn service_restart_port(explicit_port: Option<u16>) -> anyhow::Result<u16> {
2737 if let Some(port) = explicit_port {

Callers 1

mainFunction · 0.85

Calls 5

activeFunction · 0.85
read_service_metadataFunction · 0.85
start_detached_serviceFunction · 0.85
restartFunction · 0.70

Tested by

no test coverage detected