mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-26 20:50:30 +08:00
Compare commits
2 Commits
ee19749009
...
e176f6db14
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e176f6db14 | ||
|
|
68dd3fd01a |
@ -113,7 +113,7 @@ export async function startCore(detached = false): Promise<Promise<void>[]> {
|
||||
corePath,
|
||||
['-d', diffWorkDir ? mihomoProfileWorkDir(current) : mihomoWorkDir(), ctlParam, mihomoIpcPath],
|
||||
{
|
||||
detached: detached,
|
||||
detached: true,
|
||||
stdio: detached ? 'ignore' : undefined,
|
||||
env: env
|
||||
}
|
||||
@ -218,7 +218,7 @@ export async function restartCore(): Promise<void> {
|
||||
|
||||
export async function keepCoreAlive(): Promise<void> {
|
||||
try {
|
||||
await startCore(true)
|
||||
if (!child) await startCore(true)
|
||||
if (child && child.pid) {
|
||||
await writeFile(path.join(dataDir(), 'core.pid'), child.pid.toString())
|
||||
}
|
||||
|
||||
@ -234,7 +234,7 @@ const Profiles: React.FC = () => {
|
||||
endContent={
|
||||
<>
|
||||
<Button
|
||||
size="sm"
|
||||
size="md"
|
||||
isIconOnly
|
||||
variant="light"
|
||||
onPress={() => {
|
||||
@ -242,6 +242,7 @@ const Profiles: React.FC = () => {
|
||||
setUrl(text)
|
||||
})
|
||||
}}
|
||||
className="mr-2"
|
||||
>
|
||||
<MdContentPaste className="text-lg" />
|
||||
</Button>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user