Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.1, 5.7.1
-
None
-
2e54dbe86eac61e87782a138dbcc158cb6b10cd9
Description
before the signal newConnection is emited by QWebSocketServer the handshake phases for ssl and websocket needs to be complete.
If a socket is opened but due to a bad connection the handshakes(ssl or websocket) do not take place and the socket stays open. The application layer is not informed about the open connection, the created QSsl/TcpSocket is not deleted.
Also the file descriptor is not closed causing a massive useage of fd's, which are limited on linux systems (typical 1024).
tcpdump of such a connection without any handshake:
10:40:30.518201 IP RemoteIP.50708 > ServerIP.1204: Flags [S], seq 3063145000, win 8192, options [mss 1460,nop,wscale 8,nop,nop,sackOK], length 0
10:40:30.518229 IP ServerIP.1204 > RemoteIP.50708: Flags [S.], seq 329640302, ack 3063145001, win 29200, options [mss 1460,nop,nop,sackOK,nop,wscale 7], length 0
10:40:30.519044 IP RemoteIP.50708 > ServerIP.1204: Flags [.], ack 1, win 256, length 0
sometimes also ssl handshake starts but not completes:
10:40:30.523342 IP RemoteIP.50708 > ServerIP.1204: Flags [P.], seq 1:518, ack 1, win 256, length 517
10:40:30.523361 IP ServerIP.1204 > RemoteIP.50708: Flags [.], ack 518, win 237, length 0
10:40:30.523835 IP ServerIP.1204 > RemoteIP.50708: Flags [P.], seq 1:1128, ack 518, win 237, length 1127
I already fixed this issue by applying the patch (for qt-5.7.1) attached.
Attachments
Issue Links
- relates to
-
QTBUG-57026 ssl websocketserver stops accepting new connections
- Closed
-
QTBUG-56270 QWebSocketServer, telnet connection not notified
- Closed