Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
x committed Dec 28, 2024
1 parent fcd117d commit 6088442
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion extension/server/run_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func StartTestExtensionServer() {
Secret: "",
Debug: false,
Mode: hcore.SetupMode_OLD,
},
}, nil,
)
// "./tmp", "./", "./tmp", 0, false)
StartExtensionServer()
Expand Down
4 changes: 3 additions & 1 deletion v2/hcore/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ func Restart(in *StartRequest) (coreResponse *CoreInfoResponse, err error) {
coreResponse, err = errorWrapper(MessageType_UNEXPECTED_ERROR, recovered_err)
})
log.Debug("[Service] Restarting")

if in.ConfigContent == "" && in.ConfigPath == "" {
in = previousStartRequest
}
if static.CoreState != CoreStates_STARTED {
return errorWrapper(MessageType_INSTANCE_NOT_STARTED, fmt.Errorf("instance not started"))
}
Expand Down
1 change: 1 addition & 0 deletions v2/hcore/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ var (
sGroupID int
statusPropagationPort int64
globalPlatformInterface libbox.PlatformInterface
previousStartRequest *StartRequest
)

func InitHiddifyService() error {
Expand Down
2 changes: 1 addition & 1 deletion v2/hcore/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func StartService(in *StartRequest) (coreResponse *CoreInfoResponse, err error)
coreResponse, err = errorWrapper(MessageType_UNEXPECTED_ERROR, recovered_err)
})
SetCoreStatus(CoreStates_STARTING, MessageType_EMPTY, "")

previousStartRequest = in
options, err := BuildConfig(in)
if err != nil {
return errorWrapper(MessageType_ERROR_BUILDING_CONFIG, err)
Expand Down

0 comments on commit 6088442

Please sign in to comment.