From eba4c8a83cbf4aa149361ffa37d34739b8a19a20 Mon Sep 17 00:00:00 2001 From: Jianhui Zhao Date: Fri, 12 Jan 2018 13:42:09 +0800 Subject: [PATCH] Fix bug: when close, not quit loop Signed-off-by: Jianhui Zhao --- src/main.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index e35e0cd..4deedef 100755 --- a/src/main.c +++ b/src/main.c @@ -201,14 +201,13 @@ static void uwsc_onmessage(struct uwsc_client *cl, char *msg, uint64_t len, enum static void uwsc_onerror(struct uwsc_client *cl) { - printf("onerror:%d\n", cl->error); + uwsc_log_err("onerror:%d", cl->error); } static void uwsc_onclose(struct uwsc_client *cl) { - printf("onclose\n"); - - uloop_done(); + uwsc_log_debug("onclose"); + uloop_end(); } static void usage(const char *prog)