Skip to content

Commit

Permalink
Add sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesLorenz committed Dec 3, 2023
1 parent 9108af7 commit fe2229a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test_bidirectional_tcp.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#ifdef WIN32
#include <process.h>
#include <windows.h>
#else
#include <unistd.h>
#endif

#ifdef HAVE_CONFIG_H
Expand Down Expand Up @@ -60,6 +63,13 @@ void *sendthread(void *arg)
lo_server_recv(s);
fprintf(stderr, "%p.sending thread received\n", s);

/* Do not close the socket immediatelly, wait 1 second for recv */
#if defined(WIN32) || defined(_MSC_VER)
Sleep(1000);
#else
sleep(1);
#endif

fprintf(stderr, "%p.freeing address\n", s);
lo_address_free(a);

Expand Down

0 comments on commit fe2229a

Please sign in to comment.