Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1570

Websocket messages lost when ClientEndpointConfig provided

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.0.29.Final
    • 2.0.9.Final
    • None
    • None

    Description

      This issue might be related to UNDERTOW-358

      This is how I create a websocket client endpoint:

      ClientEndpointConfig config = ClientEndpointConfig.Builder.create().build();
      config.getUserProperties().put("io.undertow.websocket.CONNECT_TIMEOUT", 10);
      WebSocketContainer socketContainer = ContainerProvider.getWebSocketContainer();
      MyClient client = new MyClient(); // extends Endpoint
      session = socketContainer.connectToServer(client, config, getEventStreamURI());

      With this code the @OnMessage method of my client will never get called. Every time a message is sent I see "[XNIO-1 I/O-1] DEBUG io.undertow.websockets.core.request - UT025003: Decoding WebSocket Frame with opCode 1" in the log but that's it.
      However, if I create the client without passing the config parameter to connectToServer() it works perfectly fine (but then I won't get notified when the server goes down so I have to provide the timeout parameter).

      Attachments

        Issue Links

          Activity

            People

              flaviarnn Flavia Rainone
              mgruetzn Michael G (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: