X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;ds=sidebyside;f=test.c;h=0eb8462b4b60f26a17c87860384d238500748db8;hb=2049874f3c436cc1d85bb8bcccb272a3b933f4a9;hp=a37f85618db6c2b3eef6200711635fab0d3d1fc1;hpb=88d085b7252643ceec0c9ac646b6d6f680157617;p=utcp diff --git a/test.c b/test.c index a37f856..0eb8462 100644 --- a/test.c +++ b/test.c @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) { char buf[102400]; struct timeval timeout = utcp_timeout(u); - while(dir) { + while(!connected || utcp_is_active(u)) { size_t max = c ? utcp_get_sndbuf_free(c) : 0; if(max > sizeof buf) max = sizeof buf;