mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
limit number of /subscribe clients and queries per client
Add the following config variables (under [rpc] section): * max_subscription_clients * max_subscriptions_per_client * timeout_broadcast_tx_commit Fixes #2826
This commit is contained in:
@ -318,6 +318,16 @@ func (w *WSEvents) OnStop() {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: remove
|
||||
func (w *WSEvents) NumClients() int {
|
||||
return 1
|
||||
}
|
||||
|
||||
// TODO: remove
|
||||
func (w *WSEvents) NumClientSubscriptions(clientID string) int {
|
||||
return len(w.subscriptions)
|
||||
}
|
||||
|
||||
func (w *WSEvents) Subscribe(ctx context.Context, subscriber string, query tmpubsub.Query, outCapacity ...int) (types.Subscription, error) {
|
||||
q := query.String()
|
||||
|
||||
|
Reference in New Issue
Block a user