-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.7.0, 5.8.0, 5.9.0 Alpha
-
None
-
Linux, Win32, Win64
Using the QML WebSocket Client Example as the base, which works as expected, it is easily demonstrated that the WebSocket component behavior unexpectedly changes to failing to connect by simply removing the url property declared on each and instead assigning them in the onClicked signal handler with:
onClicked: {
socket.url = "ws://echo.websocket.org";
secureWebSocket.url = "wss://echo.websocket.org";
socket.active = !socket.active
secureWebSocket.active = !secureWebSocket.active;
//Qt.quit();
}
Example attached.
Clicking again (making the socket inactive) and then once more (to flag it as active again) then opens a stable connection.