change the FileStore::is_open() to try to connect to the sock to tetermine if a FileStore is open instead of a PID file. because when deploying with docker a process with the same PID can be running (and often is the mize process itself)

This commit is contained in:
Sebastian Moser
2025-07-01 20:10:25 +02:00
parent 1ca2dcaf73
commit 85878f5707
4 changed files with 32 additions and 16 deletions

View File

@@ -100,7 +100,7 @@ pub fn os_instance_init(instance: &mut Instance) -> MizeResult<()> {
},
};
if FileStore::store_is_opened(store_path.to_owned())? {
if FileStore::store_is_opened(store_path.to_owned(), instance)? {
// if the store is already opened, connect to the instance, that opened it and join
// it's namespace
@@ -114,7 +114,7 @@ pub fn os_instance_init(instance: &mut Instance) -> MizeResult<()> {
#[cfg(target_family = "windows")]
{
error!("CONNECTING... would connect, but that is not imon't identify as anything, to not cause anyone problems... So that everybody can be satisfied...plemented on windows yet");
error!("CONNECTING... would connect, but that is not implemented on windows yet");
}
} else {