mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 06:54:41 +00:00
return ErrorOverflow on Subscribe if server is overflowed
> why we need it? most of our subscribers will be RPC WS subscribers, so if there are too many, nothing wrong with rejecting to subscribe. however, consensus reactor must be the first to subscribe, since its work depends on the pubsub package.
This commit is contained in:
@@ -17,8 +17,8 @@ func TestExample(t *testing.T) {
|
||||
defer s.Stop()
|
||||
|
||||
ch := make(chan interface{}, 1)
|
||||
s.Subscribe("example-client", query.MustParse("abci.account.name=John"), ch)
|
||||
err := s.PublishWithTags("Tombstone", map[string]interface{}{"abci.account.name": "John"})
|
||||
err := s.Subscribe("example-client", query.MustParse("abci.account.name=John"), ch)
|
||||
require.NoError(t, err)
|
||||
s.PublishWithTags("Tombstone", map[string]interface{}{"abci.account.name": "John"})
|
||||
assertReceive(t, "Tombstone", ch)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user