Skip to content

Conversation

@Daniel1984
Copy link
Contributor

Description:

adding a threshold to avoid hitting rate limit when resubscribing to channels

Breaking changes:

N/A

New features:

N/A

Fixes:

  • rate limiting fix

PR status:

  • Version bumped
  • Change-log updated

defer m.mtx.Unlock()

// make sure we don't hit the rate limit
time.Sleep(rateLimit * time.Millisecond)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm, thats not ideal for people that just use 1 or 5 subscriptions... takes a long time...

how about something that works also well for the many use cases where people have less than 20 connections?

maybe there is a lib for throttling in golang or something we can build with the mutexes we used elsewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants