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

Suspicious code fragment inside class BufferedTextMessage

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.0.1.Final
    • 1.0.0.Final
    • Core
    • None

    Description

      In method handleEvent of class BufferedTextMessage, at line 104 there is the code fragment:

      if (res == -1) {
        checkMaxSize(channel, res);
        buffer.flip();
        data.write(buffer);
        complete = true;
        callback.complete(channel.getWebSocketChannel(),
          BufferedTextMessage.this);
        return;
      }
      

      Now the first thing "checkMaxSize" does is to add "res" to "currentSize", in this case decreasing it by one, which seems to be incorrect behavior.

      In fact we detected this problem when we were trying to find the cause of a strange websocket-related problem. After commenting out the call to "checkMaxSize", our application worked correctly.

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            schpeter_jira Peter Schönhofen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: