Skip to content

Fix communication over websocket so it will become truly asynchronous #1763

@AlexeyGirin

Description

@AlexeyGirin

As a plugin developer,
I want to get backend processing tasks asynchronously,
So the plugin wouldn't need to adjust timeouts based on the time backend needs to complete background tasks.

The plugin uses ping-pong mechanism to understand whether the server is still online while processing background tasks. The problem is that answer to a specific message is sent only after answers to all previous messages has been sent. So at this moment message flow over websocket (simplified) looks like this:

-> schedule_css_locators_generation
-> ping
-> ping
<- schedule_css_locators_generation result
<- pong
<- pong

The correct flow would be

-> schedule_css_locators_generation
-> ping
<- pong
-> ping
<- pong
<- schedule_css_locators_generation result

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

QA

Relationships

None yet

Development

No branches or pull requests

Issue actions