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

WebSocket onFailure Why not return the connection information at that time #15

Open
disciplinary opened this issue Apr 19, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@disciplinary
Copy link

disciplinary commented Apr 19, 2023

Uploading image.png…
WebSocketConnection.onFailure,

 @Override
    public void onFailure(WebSocket ws, Throwable t, Response response) {
        logger.error("[Connection {}] Failure", connectionId, t);
// Wouldn't it be better to just return null and return the connectionId
        onFailureCallback.onReceive(null);
    }

If one of the multiple subscriptions is disconnected, how do you retry without knowing the current subscription information Or throw the exception out

@aisling-2
Copy link
Collaborator

Ideally, the method should be:

    @Override
    public void onFailure(WebSocket ws, Throwable t, Response response) {
        logger.error("[Connection {}] Failure", connectionId, t);
        onFailureCallback.onFailure(t, response);
    }

So that the WS connection's Failure Callback can get more information when failure is detected and define how to handle next. We haven an internal ticket to solve this in the future.

@aisling-2 aisling-2 added the enhancement New feature or request label Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants