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

Bugfix for Example: The HTTP request to initiate the WebSocket connection to [wss://ws.bitvavo.com/v2/] failed #14

Open
atienkamp opened this issue Nov 6, 2021 · 0 comments

Comments

@atienkamp
Copy link

The example tests werent working for websockets.
setting the buffer size fixed this issue:

    public WebsocketClientEndpoint(URI endpointURI, Bitvavo bitv) {
        try {
            bitvavo = bitv;
            WebSocketContainer container = ContainerProvider.getWebSocketContainer();
            container.setDefaultMaxBinaryMessageBufferSize(1024*1024);
            container.setDefaultMaxTextMessageBufferSize(1024*1024);
            container.connectToServer(this, endpointURI);
        } catch (Exception e) {
            e.printStackTrace();
            bitvavo.errorToConsole("Caught exception in instantiating websocket." + e);
            this.reconnectTimer = 100;
            retryConnecting(endpointURI);
        }
    }

container.connectToServer(this, endpointURI);

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

No branches or pull requests

1 participant