flow icon indicating copy to clipboard operation
flow copied to clipboard

fix: avoid blocking thread on ViteWebsocketConnection creation

Open mcollovati opened this issue 1 year ago • 2 comments

It may happen that the thread that is createing ViteWebsocketConnection gets blocked when trying to create the internal websocket client, because a message from Vite server may be received and forwarded to the browser websocket before the websocket client creation future is completed, leaving the browser request thread pending indefinitely.

This change creates the websocket client asynchronously, but immediately closing the browser connection if the client connection cannote be established.

Fixes #19397

mcollovati avatar May 18 '24 17:05 mcollovati

Test Results

1 108 files  +25  1 108 suites  +25   1h 20m 28s :stopwatch: + 5m 3s 7 034 tests +60  6 985 :white_check_mark: +59  49 :zzz: +1  0 :x: ±0  7 404 runs  +61  7 345 :white_check_mark: +60  59 :zzz: +1  0 :x: ±0 

Results for commit 20942a52. ± Comparison against base commit ef483fe4.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar May 18 '24 17:05 github-actions[bot]

This ticket/PR has been released with Vaadin 24.5.0.alpha1 and is also targeting the upcoming stable 24.5.0 version.

vaadin-bot avatar May 31 '24 11:05 vaadin-bot