From bd4a9f3f220c0b77d70a329f2460bb8a4b737913 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 15 Feb 2023 16:45:37 +0300 Subject: [PATCH] rpcsrv: drop ws from subscriber Subscribers can be local as well and no one uses this field anyway. --- pkg/services/rpcsrv/server.go | 2 +- pkg/services/rpcsrv/subscription.go | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/services/rpcsrv/server.go b/pkg/services/rpcsrv/server.go index 1899a0ee1..6531ccaf8 100644 --- a/pkg/services/rpcsrv/server.go +++ b/pkg/services/rpcsrv/server.go @@ -470,7 +470,7 @@ func (s *Server) handleHTTPRequest(w http.ResponseWriter, httpRequest *http.Requ } resChan := make(chan abstractResult) // response.abstract or response.abstractBatch subChan := make(chan intEvent, notificationBufSize) - subscr := &subscriber{writer: subChan, ws: ws} + subscr := &subscriber{writer: subChan} s.subsLock.Lock() s.subscribers[subscr] = true s.subsLock.Unlock() diff --git a/pkg/services/rpcsrv/subscription.go b/pkg/services/rpcsrv/subscription.go index 306c27f26..511aed2ef 100644 --- a/pkg/services/rpcsrv/subscription.go +++ b/pkg/services/rpcsrv/subscription.go @@ -17,7 +17,6 @@ type ( // subscriber is an event subscriber. subscriber struct { writer chan<- intEvent - ws *websocket.Conn overflown atomic.Bool // These work like slots as there is not a lot of them (it's // cheaper doing it this way rather than creating a map),