Browse Source

set pubsub default capacity to 0

Refs #951

Jae: I don't know a good way to catch these errors in general, but
forcing pubsub's internal channel to have a capacity of 0 will reveal
bugs sooner, if the subscriber also has a 0 or small capacity ch to pull
from.
pull/1769/head
Anton Kaliaev 6 years ago
parent
commit
aaddf5d32f
No known key found for this signature in database GPG Key ID: 7B6881D965918214
3 changed files with 5 additions and 3 deletions
  1. +1
    -1
      rpc/lib/server/handlers.go
  2. +3
    -1
      rpc/lib/types/types.go
  3. +1
    -1
      types/event_bus.go

+ 1
- 1
rpc/lib/server/handlers.go View File

@ -17,7 +17,7 @@ import (
"github.com/gorilla/websocket"
"github.com/pkg/errors"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
types "github.com/tendermint/tendermint/rpc/lib/types"
cmn "github.com/tendermint/tmlibs/common"
"github.com/tendermint/tmlibs/log"


+ 3
- 1
rpc/lib/types/types.go View File

@ -7,7 +7,9 @@ import (
"strings"
"github.com/pkg/errors"
"github.com/tendermint/go-amino"
amino "github.com/tendermint/go-amino"
tmpubsub "github.com/tendermint/tendermint/libs/pubsub"
)


+ 1
- 1
types/event_bus.go View File

@ -9,7 +9,7 @@ import (
"github.com/tendermint/tmlibs/log"
)
const defaultCapacity = 1000
const defaultCapacity = 0
type EventBusSubscriber interface {
Subscribe(ctx context.Context, subscriber string, query tmpubsub.Query, out chan<- interface{}) error


Loading…
Cancel
Save