-
Notifications
You must be signed in to change notification settings - Fork 10
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
28 additions
and
14 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 |
---|---|---|
|
@@ -48,11 +48,11 @@ Show | |
|
||
Hide | ||
Tab | ||
Sleep 300ms | ||
Sleep 500ms | ||
Show | ||
|
||
Hide | ||
Enter@1ms 50 | ||
Enter@1ms 800 | ||
Sleep 10s | ||
Show | ||
|
||
|
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