]> git.meshlink.io Git - meshlink/blobdiff - test/invite-join.c
Test whether UDP communication is working.
[meshlink] / test / invite-join.c
index 4471091c2635c15162a514fa4940c71cbf5b6c02..50b79fb47531b0a59c79275e26611427e6dedc2d 100644 (file)
@@ -70,6 +70,17 @@ int main(int argc, char *argv[]) {
                return 1;
        }
 
+       int pmtu = meshlink_get_pmtu(mesh1, meshlink_get_node(mesh1, "baz"));
+       for(int i = 0; i < 10 && !pmtu; i++) {
+               sleep(1);
+               pmtu = meshlink_get_pmtu(mesh1, meshlink_get_node(mesh1, "baz"));
+       }
+
+       if(!pmtu) {
+               fprintf(stderr, "UDP communication with baz not possible after 10 seconds\n");
+               return 1;
+       }
+
        // Clean up.
 
        meshlink_stop(mesh2);