Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138560

Websocket disconnect instantly from QHttpServer

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 6.5
    • Qt Http Server
    • None

    Description

      A customer reported that when they try to connect to a httpserver with a websocket, they can get the connection on server side OK but the server pretty much instantly closes the socket.

      Steps to reproduce the issue:

      • Run server
      • Run client

      => Observe the client output

      When building server with Qt 6.8.3 and adding:

          s.addWebSocketUpgradeVerifier(&s, [](const QHttpServerRequest &request) {
              return QHttpServerWebSocketUpgradeResponse::accept();
          }); 

      the sample will work. The connection will no longer be closed and and the message from the server can now be received.

      Attachments

        1. server.zip
          1 kB
        2. client.zip
          0.9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            oyheskes Øystein Heskestad
            oyheskes Øystein Heskestad
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes