This commit is contained in:
2025-08-21 12:21:52 +02:00
parent febe87c55e
commit 40b3911781
4 changed files with 3 additions and 7 deletions

View File

@@ -5,12 +5,8 @@ import freeflowuniverse.herolib.schemas.jsonrpcmodel
// Helper function to get or create the RPC client
fn (mut c ZinitRPC) client_() !&jsonrpc.Client {
if client := c.rpc_client {
return client
}
// Create Unix socket client
mut client := jsonrpc.new_unix_socket_client(c.socket_path)
c.rpc_client = client
return client
}

View File

@@ -30,7 +30,7 @@ pub struct ZinitRPC {
pub mut:
name string = 'default'
socket_path string
rpc_client ?&jsonrpc.Client @[skip]
// rpc_client ?&jsonrpc.Client @[skip]
}
// your checking & initialization code if needed