rpcsrv: drop ws from subscriber

Subscribers can be local as well and no one uses this field anyway.
This commit is contained in:
Roman Khimov 2023-02-15 16:45:37 +03:00
parent 6f7fed344b
commit bd4a9f3f22
2 changed files with 1 additions and 2 deletions

View file

@ -470,7 +470,7 @@ func (s *Server) handleHTTPRequest(w http.ResponseWriter, httpRequest *http.Requ
} }
resChan := make(chan abstractResult) // response.abstract or response.abstractBatch resChan := make(chan abstractResult) // response.abstract or response.abstractBatch
subChan := make(chan intEvent, notificationBufSize) subChan := make(chan intEvent, notificationBufSize)
subscr := &subscriber{writer: subChan, ws: ws} subscr := &subscriber{writer: subChan}
s.subsLock.Lock() s.subsLock.Lock()
s.subscribers[subscr] = true s.subscribers[subscr] = true
s.subsLock.Unlock() s.subsLock.Unlock()

View file

@ -17,7 +17,6 @@ type (
// subscriber is an event subscriber. // subscriber is an event subscriber.
subscriber struct { subscriber struct {
writer chan<- intEvent writer chan<- intEvent
ws *websocket.Conn
overflown atomic.Bool overflown atomic.Bool
// These work like slots as there is not a lot of them (it's // These work like slots as there is not a lot of them (it's
// cheaper doing it this way rather than creating a map), // cheaper doing it this way rather than creating a map),