summaryrefslogtreecommitdiffstats
path: root/tests/auto/network/socket/qlocalsocket
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2016-07-28 17:28:27 +0300
committerAlex Trotsenko <alex1973tr@gmail.com>2016-08-04 15:25:39 +0000
commit595c6abf9d2cb666f2502bbf89ab3a7052717027 (patch)
tree468106b263d4712b400e08b5eb60993c431abe4f /tests/auto/network/socket/qlocalsocket
parent457d91bb07a8ad0d1a582016566ba5119bb1ac95 (diff)
QLocalSocket/Tcp: open device before making a connection
According to QLocalSocket's documentation, connectToServer() must initiate a connection attempt after opening the device. Otherwise, if a connection succeeds immediately, connected() signal will be emitted on closed device. So, this patch ensures that TCP-based implementation behaves correctly. Change-Id: I4cc9474815e091a1491a429a6dc17f9cf0154f58 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests/auto/network/socket/qlocalsocket')
-rw-r--r--tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
index 6e55b15a18..33aceb9159 100644
--- a/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/network/socket/qlocalsocket/tst_qlocalsocket.cpp
@@ -190,6 +190,7 @@ private slots:
void slotConnected()
{
QCOMPARE(state(), QLocalSocket::ConnectedState);
+ QVERIFY(isOpen());
}
void slotDisconnected()
{