-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.4.1
-
None
-
Windows 7 Profesional 64-bit
Qt_5_4_1_MSVC2010_OpenGL_32bit-Release
Google Chrome Version 43.0.2357.65 m
To reproduce this bug:
0) You need two computers: one for WebSocket server, and one for WebSocket client. Client should connect to server via WiFi. There should be another WiFi accesible for the client.
1) Modify Echo Server example (http://doc.qt.io/qt-5/qtwebsockets-echoserver-example.html) to keep connection after sending echo message (to don't disconnect client automatically).
2) Connect to Echo Server with simple Chrome JavaScript client.
3) Play around with echo messages
4) Close the browser. This should work fine, Echo Server's QWebSocket should emit the disconnected() signal. The debug message should be printed.
5) Open client once again. Connect to Echo Server.
6) Play around with echo messages
7) Change your WiFi network.
8) Client (browser) will disconnect, but QWebSocket will not. No disconnected() signal will be emitted, no debug message will be printed.
Maybe switching from WiFi to LAN will also give the same effect.
------------
EDIT
I did more tests. No stateChanged() signal is emitted. No error() signal is emitted. socket remains valid (isValid() method).
--------------
EDIT 2
If i try to ping (QWebSocket::ping(...)) this zombie socket, I get a seg fault.