mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 23:25:33 +00:00
More realiable tests
This commit is contained in:
@ -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) {
|
||||
|
@ -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 &&
|
||||
|
Reference in New Issue
Block a user