payden / libwsclient

WebSocket client library for C
GNU General Public License v3.0
133 stars 73 forks source link

test.c add sleep(1) #18

Open hammersmith-xie opened 4 years ago

hammersmith-xie commented 4 years ago

There may be thread contention, libwsclient_run was executed before the handshake was completed, causing the connection to fail.

PixMod commented 4 years ago

libwsclient_run() calls

pthread_join(c->handshake_thread, NULL);

before creating thread. So there's no problem.