forked from cerc-io/laconicd-deprecated
nosec G705
This commit is contained in:
@@ -124,6 +124,7 @@ func (m *memEventBus) closeAllSubscribers(name string) {
|
||||
subsribers := m.subscribers[name]
|
||||
delete(m.subscribers, name)
|
||||
|
||||
// #nosec G705
|
||||
for _, sub := range subsribers {
|
||||
close(sub)
|
||||
}
|
||||
@@ -134,6 +135,7 @@ func (m *memEventBus) publishAllSubscribers(name string, msg coretypes.ResultEve
|
||||
subsribers := m.subscribers[name]
|
||||
m.subscribersMux.RUnlock()
|
||||
|
||||
// #nosec G705
|
||||
for _, sub := range subsribers {
|
||||
select {
|
||||
case sub <- msg:
|
||||
|
||||
@@ -102,6 +102,7 @@ func (api *PublicFilterAPI) timeoutLoop() {
|
||||
for {
|
||||
<-ticker.C
|
||||
api.filtersMu.Lock()
|
||||
// #nosec G705
|
||||
for id, f := range api.filters {
|
||||
select {
|
||||
case <-f.deadline.C:
|
||||
|
||||
@@ -240,6 +240,7 @@ func (es *EventSystem) eventLoop() {
|
||||
delete(es.index[f.typ], f.id)
|
||||
|
||||
var channelInUse bool
|
||||
// #nosec G705
|
||||
for _, sub := range es.index[f.typ] {
|
||||
if sub.event == f.event {
|
||||
channelInUse = true
|
||||
|
||||
@@ -173,6 +173,7 @@ func (s *websocketsServer) readLoop(wsConn *wsConn) {
|
||||
subscriptions := make(map[rpc.ID]pubsub.UnsubscribeFunc)
|
||||
defer func() {
|
||||
// cancel all subscriptions when connection closed
|
||||
// #nosec G705
|
||||
for _, unsubFn := range subscriptions {
|
||||
unsubFn()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user