summaryrefslogtreecommitdiff
path: root/tests/test-io-stream-common.c
diff options
context:
space:
mode:
authorJakub Adam <jakub.adam@collabora.com>2019-03-05 18:05:56 +0100
committerJakub Adam <jakub.adam@collabora.com>2019-03-05 19:51:12 +0100
commita02f55866c5fbc6eb738dcf26a462ef641d8b915 (patch)
treee5ffe351399a4ac1eb51f8ac27f22aabd593ef24 /tests/test-io-stream-common.c
parent926afef019ca9f297cebbe13479159ac5c087f00 (diff)
downloadlibnice-a02f55866c5fbc6eb738dcf26a462ef641d8b915.tar.gz
test-send-recv: Fix occasional timeouts
While waiting for write thread to finish sending, keep also receiving so that any STUN messages from the peer still get processed.
Diffstat (limited to 'tests/test-io-stream-common.c')
-rw-r--r--tests/test-io-stream-common.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test-io-stream-common.c b/tests/test-io-stream-common.c
index 5874cee..0f9adec 100644
--- a/tests/test-io-stream-common.c
+++ b/tests/test-io-stream-common.c
@@ -506,7 +506,11 @@ check_for_termination (TestIOStreamThreadData *data, gsize *recv_count,
gpointer tmp;
/* Wait for transmission to complete. */
- while (*send_count < expected_recv_count);
+ while (*send_count < expected_recv_count) {
+ if (data->callbacks->wait_transmission_cb) {
+ data->callbacks->wait_transmission_cb (data->agent);
+ }
+ }
/* Send a close message. */
tmp = g_object_get_data (G_OBJECT (data->agent), "stream-id");