Fix jsonrpc references

This commit is contained in:
tutman96 2025-01-30 21:23:39 +00:00
parent 6fd978b382
commit ec20835c45
2 changed files with 4 additions and 2 deletions

View File

@ -26,6 +26,8 @@ func NewJSONRPCRouter(writer io.Writer, handlers map[string]*RPCHandler) *JSONRP
return &JSONRPCRouter{ return &JSONRPCRouter{
writer: writer, writer: writer,
handlers: handlers, handlers: handlers,
responseChannels: make(map[int64]chan JSONRPCResponse),
} }
} }

View File

@ -96,7 +96,7 @@ func (s *PluginRpcServer) SocketPath() string {
} }
func (s *PluginRpcServer) handleConnection(conn net.Conn) { func (s *PluginRpcServer) handleConnection(conn net.Conn) {
rpcserver := jsonrpc.NewJSONRPCServer(conn, map[string]*jsonrpc.RPCHandler{}) rpcserver := jsonrpc.NewJSONRPCRouter(conn, map[string]*jsonrpc.RPCHandler{})
ctx, cancel := context.WithCancel(context.Background()) ctx, cancel := context.WithCancel(context.Background())
defer cancel() defer cancel()
@ -129,7 +129,7 @@ func (s *PluginRpcServer) handleConnection(conn net.Conn) {
} }
} }
func (s *PluginRpcServer) handleRpcStatus(ctx context.Context, rpcserver *jsonrpc.JSONRPCServer) { func (s *PluginRpcServer) handleRpcStatus(ctx context.Context, rpcserver *jsonrpc.JSONRPCRouter) {
s.status = PluginRpcStatusUnknown s.status = PluginRpcStatusUnknown
log.Printf("Plugin rpc server started. Getting supported methods...") log.Printf("Plugin rpc server started. Getting supported methods...")