Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent flooding currentStatus messages #2333

Merged
merged 1 commit into from
Sep 15, 2020

Conversation

noomorph
Copy link
Collaborator

@noomorph noomorph commented Sep 15, 2020

  • This is a small change

Description:

Fixes flood of currentStatus messages when the app is really busy and cannot reply.
Each currentStatus request generates one extra currentStatus request, and that goes up quite fast.

Looks like a regression after 41400bfc (kudos to @d4vidi for the investigation)

[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND]  [90m{"type":"currentStatus","params":{},"messageId":63396} [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND]  [90m{"type":"currentStatus","params":{},"messageId":63397} [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND]  [90m{"type":"currentStatus","params":{},"messageId":63398} [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND]  [90m{"type":"currentStatus","params":{},"messageId":63399} [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND]  [90m{"type":"currentStatus","params":{},"messageId":63400} [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND]  [90m{"type":"currentStatus","params":{},"messageId":63401} [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND]  [90m{"type":"currentStatus","params":{},"messageId":63402} [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND]  [90m{"type":"currentStatus","params":{},"messageId":63403} [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND]  [90m{"type":"currentStatus","params":{},"messageId":63404} [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [DetoxServer.js/MESSAGE]  [90mrole=tester action=currentStatus (sessionId=511125a8-9f8c-4ef3-0667-e1740512d733) [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [DetoxServer.js/MESSAGE]  [90mrole=tester action=currentStatus (sessionId=511125a8-9f8c-4ef3-0667-e1740512d733) [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [DetoxServer.js/MESSAGE]  [90mrole=tester action=currentStatus (sessionId=511125a8-9f8c-4ef3-0667-e1740512d733) [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [DetoxServer.js/MESSAGE]  [90mrole=tester action=currentStatus (sessionId=511125a8-9f8c-4ef3-0667-e1740512d733) [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [DetoxServer.js/MESSAGE]  [90mrole=tester action=currentStatus (sessionId=511125a8-9f8c-4ef3-0667-e1740512d733) [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [DetoxServer.js/MESSAGE]  [90mrole=tester action=currentStatus (sessionId=511125a8-9f8c-4ef3-0667-e1740512d733) [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [DetoxServer.js/MESSAGE]  [90mrole=tester action=currentStatus (sessionId=511125a8-9f8c-4ef3-0667-e1740512d733) [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [DetoxServer.js/MESSAGE]  [90mrole=tester action=currentStatus (sessionId=511125a8-9f8c-4ef3-0667-e1740512d733) [39m
[09:17:40]W:		 [Phase: Tests] detox[3748] TRACE: [DetoxServer.js/MESSAGE]  [90mrole=tester action=currentStatus (sessionId=511125a8-9f8c-4ef3-0667-e1740512d733) [39m

@noomorph noomorph requested review from rotemmiz and d4vidi September 15, 2020 10:25
@noomorph noomorph changed the title fix: prevent flooding currentStatuss messages fix: prevent flooding currentStatus messages Sep 15, 2020
@d4vidi d4vidi merged commit 1985cc5 into master Sep 15, 2020
@d4vidi d4vidi deleted the fix/client-currentStatus-flood branch September 15, 2020 10:48
@@ -131,7 +131,7 @@ class Client {
}

async sendAction(action) {
if (this.slowInvocationTimeout) {
if (this.slowInvocationTimeout && action.type !== 'currentStatus') {
Copy link
Member

Choose a reason for hiding this comment

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

😵🤦

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.

3 participants