diff options
Diffstat (limited to 'jsonrpc/client')
-rw-r--r-- | jsonrpc/client/client.go | 4 | ||||
-rw-r--r-- | jsonrpc/client/message_dispatcher.go | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/jsonrpc/client/client.go b/jsonrpc/client/client.go index a34828a..67ed307 100644 --- a/jsonrpc/client/client.go +++ b/jsonrpc/client/client.go @@ -32,8 +32,8 @@ type RPCClientConfig struct { type RPCClient struct { config RPCClientConfig conn *websocket.Conn - requests messageDispatcher[message.RequestID, message.Response] - subscriber messageDispatcher[message.SubscriptionID, json.RawMessage] + requests *messageDispatcher[message.RequestID, message.Response] + subscriber *messageDispatcher[message.SubscriptionID, json.RawMessage] stop_signal chan struct{} } diff --git a/jsonrpc/client/message_dispatcher.go b/jsonrpc/client/message_dispatcher.go index 6484484..dab75ca 100644 --- a/jsonrpc/client/message_dispatcher.go +++ b/jsonrpc/client/message_dispatcher.go @@ -14,9 +14,9 @@ type messageDispatcher[K comparable, V any] struct { } // newMessageDispatcher Creates a new messageDispatcher -func newMessageDispatcher[K comparable, V any](bufferSize int) messageDispatcher[K, V] { +func newMessageDispatcher[K comparable, V any](bufferSize int) *messageDispatcher[K, V] { chans := make(map[K]chan<- V) - return messageDispatcher[K, V]{ + return &messageDispatcher[K, V]{ chans: chans, bufferSize: bufferSize, } |