Disconnect when handshake fails
It is unexpected that websocket does not disconnect once it knows the handshake has failed.
Pick-to: 6.5 6.4 6.2 5.15 Change-Id: I11e64745ffdb01c11ac79739cf7f384ad6cc4590 Reviewed-by: Timur Pocheptsov timur.pocheptsov@qt.io (cherry picked from commit 7efdec16)
- asturmlechner 2023-01-06: Resolve conflict with dev branch commit 55cef3a1