...
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user