diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-02-20 09:50:44 +0100 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-02-22 03:36:54 +0100 |
commit | c58ee54a707717b142f6e90cf48302884feb0b12 (patch) | |
tree | bd6ede17d68286c5ce43061a8f89b68a4db5a28e /src/widgets/widgets/qmenu.cpp | |
parent | 962a3d8a988cb695b08d79900fb25d2c41a2225c (diff) |
tst_qtcpsocket::bind - amend the recent fix
0. The recent patch fixed the case when we can suddenly (meaning from
a particular version of Darwin) bind on a port number 1. Unfortunately,
it's not the case for IPv4 and while fixing one test case, the patch broke
another - so this patch addresses this.
1. Unfortunately, binding on a fixed port 1 on macOS made the test flaky
- we run this 'bind' several times and sometimes OS thinks port is already
bound (because of the previous test case) - closing the connection seems
to fix this problem (thus this patch do this also).
2. As a bonus a proper resource management added (aka RAII) where we would
previously leak a socket in case some QCOMPARE failed.
Fixes: QTBUG-81905
Change-Id: I90c128a332903bb44ab37de4775ca00d390dc162
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/widgets/widgets/qmenu.cpp')
0 files changed, 0 insertions, 0 deletions