mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-18 22:14:35 +00:00
wait 100ms before kicking a subscriber out
+ a test for indexer_service
This commit is contained in:
@@ -38,6 +38,7 @@ import (
|
||||
"context"
|
||||
"errors"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
cmn "github.com/tendermint/tendermint/libs/common"
|
||||
)
|
||||
@@ -394,7 +395,7 @@ func (state *state) send(msg interface{}, tags map[string]string) {
|
||||
// don't block on buffered channels
|
||||
select {
|
||||
case subscription.out <- Message{msg, tags}:
|
||||
default:
|
||||
case <-time.After(100 * time.Millisecond):
|
||||
state.remove(clientID, qStr, ErrOutOfCapacity)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user