More realiable tests

This commit is contained in:
Paul-Louis Ageneau
2020-05-04 11:22:43 +02:00
parent b9102a156a
commit 738cbe78a0
2 changed files with 2 additions and 2 deletions

View File

@ -168,7 +168,7 @@ int test_capi_main() {
rtcSetMessageCallback(peer1->dc, messageCallback);
attempts = 10;
while (!peer2->connected && attempts--)
while (!peer2->connected && !peer1->connected && attempts--)
sleep(1);
if (peer1->state != RTC_CONNECTED || peer2->state != RTC_CONNECTED) {

View File

@ -115,7 +115,7 @@ void test_connectivity() {
});
int attempts = 10;
while ((!dc2 || !dc2->isOpen()) && attempts--)
while ((!dc2 || !dc2->isOpen() || !dc1->isOpen()) && attempts--)
this_thread::sleep_for(1s);
if (pc1->state() != PeerConnection::State::Connected &&