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

The WebSocket client pool should not starve on connect error. #5438

Open
wants to merge 1 commit into
base: 4.x
Choose a base branch
from

Conversation

vietj
Copy link
Member

@vietj vietj commented Jan 9, 2025

Motivation:

The client WebSocket pool implementation (which is not really a pool but instead a semaphore + a wait queue) does not decrement the semaphore when the connection fail to be established.

Currently, no operation is done beside calling back the caller. As consequence, the wait queue fills with new requests and never satisfy them since.

Changes:

When the connection fails, the semaphore should be released and check the wait queue for pending requests.

@vietj vietj added this to the 4.5.12 milestone Jan 9, 2025
@vietj vietj self-assigned this Jan 9, 2025
@vietj vietj added the bug label Jan 9, 2025
@vietj vietj linked an issue Jan 9, 2025 that may be closed by this pull request
@vietj vietj force-pushed the websocket-pool-should-not-starve-on-connect-error branch 2 times, most recently from a61da31 to 1861820 Compare January 9, 2025 21:06
Motivation:

The client WebSocket pool implementation (which is not really a pool but instead a semaphore + a wait queue) does not decrement the semaphore when the connection fails to be established.

Currently, no operation is done beside calling back the caller. As consequence, the wait queue fills with new requests and never satisfy them since.

Changes:

When the connection fails, the semaphore should be released and check the wait queue for pending requests.
@vietj vietj force-pushed the websocket-pool-should-not-starve-on-connect-error branch from 1861820 to c0da53c Compare January 9, 2025 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vertx 4.2.6 WebsocketEndpoint InflightRequest Not Reducing
1 participant