Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QWebSocketClient close() leads to TCP reset instead proper disconnection

QWebSocketClient close() leads to TCP reset instead proper disconnection

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 393 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • aha_1980A Offline
    aha_1980A Offline
    aha_1980
    Lifetime Qt Champion
    wrote on last edited by aha_1980
    #1

    Hi,

    I'm running the Echo server example together with the Echo client example on Ubuntu 18.04 x64 with Qt 5.14.0 and encountering a strange problem: When the client calls close(), I'd expect a proper shutdown sequence (TCP FIN > FIN ACK > ACK).

    What instead happens is:

    • The client sends a Websocket FIN (packet 11)
    • The client sends a TCP FIN (packet 12)
    • The server responds with a Websocket FIN (packet 13)
    • The client sends a TCP RST which aborts the connection (packet 14)

    websocket-client-rst.png

    I'd expect the packet 11 as unneeded, as the Websocket FIN was already given in packets 9 and 10. Unfortunately, now all goes wrong and the server does not respond with a TCP FIN ACK.

    That really smells like a bug - am I missing something?

    Regards

    Qt has to stay free or it will die.

    1 Reply Last reply
    0
    • Kent-DorfmanK Offline
      Kent-DorfmanK Offline
      Kent-Dorfman
      wrote on last edited by
      #2

      From what I understand there are differing session semantics, depending upon which http version being used. For 1.1 who closes the session depends upon who sends the header/response "Connection: close". You might play with that to see if the behaviour changes and get a better idea what's going on.

      If you meet the AI on the road, kill it.

      1 Reply Last reply
      1
      • aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by
        #3

        I've had the same problem when running the client against ws://echo.websocket.org and created QTBUG-81084 to track that.

        Thanks and regards

        Qt has to stay free or it will die.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved