aboutsummaryrefslogtreecommitdiff
path: root/jsonrpc
diff options
context:
space:
mode:
Diffstat (limited to 'jsonrpc')
-rw-r--r--jsonrpc/client/client.go4
-rw-r--r--jsonrpc/client/message_dispatcher.go4
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,
}