-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
qrcodemodel: Rate limit the emission of reselect auth mode events
When hitting the Enter key for a while, bubbletea sends lots of events and we may imply sending reselectAuthMode{} events faster than we can actually handle the cancellation/reauthModeSelection in the whole stack. This never happened (ever) when using the example broker, but it may actually happen in a real world scenario where the broker may not cancel the requests quickly enough. Do this instead of avoiding the handling of the reselectAuthMode event because it's better to prevent bubbletea to break our (fragile) system.
- Loading branch information
Showing
3 changed files
with
27 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,8 +52,8 @@ Sleep 300ms | |
Show | ||
|
||
Hide | ||
Enter@1ms 50 | ||
Sleep 10s | ||
Enter@1ms 800 | ||
Sleep 3s | ||
Show | ||
|
||
Sleep 300ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters