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

QWebSocket start/killtimer warning

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.13, 5.14
    • Fix Version/s: 5.15.1, 6.2.0 Alpha
    • Component/s: WebSockets
    • Labels:
      None
    • Platform/s:
      Linux/X11
    • Commits:
      393fcf8a64748f0c59f47d254667518dba9e2fc3 (qt/qtwebsockets/dev) 34010e649734fe7a41d1a0280c606b15de5c2799 (qt/qtwebsockets/5.15)

      Description

      My problem is that when I use QWebSocket with QThread, there are a lot of errors when getting data on the socket.

      Methods of opening and closing I use via

       

      QMetaObject::invokeMethod(m_WebSocket, "open", Qt::QueuedConnection, Q_ARG(QUrl, m_url));
      QMetaObject::invokeMethod(m_WebSocket, "close", Qt::QueuedConnection,
       Q_ARG(QWebSocketProtocol::CloseCode, QWebSocketProtocol::CloseCodeNormal),
       Q_ARG(QString, QString("Reconnect by add new stream")));
      

       

       

      [23-04-2020 12:10:12] [Warning] <:0> QObject::startTimer: Timers cannot be started from another thread
      [23-04-2020 12:10:12] [Warning] <:0> QObject::killTimer: Timers cannot be stopped from another thread
      

       But on Qt 5.12.7 it ok

        Attachments

        1. CMakeLists.txt
          0.4 kB
        2. main.cpp
          0.3 kB
        3. websocket_client.cpp
          7 kB
        4. websocket_client.h
          2 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            manordheim Mårten Nordheim
            Reporter:
            man_k28 Stanislav Prokofev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes