diff --git a/src/connection/connection.c b/src/connection/connection.c index 73639d43..ce48323b 100644 --- a/src/connection/connection.c +++ b/src/connection/connection.c @@ -355,7 +355,12 @@ ssize_t neu_conn_send(neu_conn_t *conn, uint8_t *buf, ssize_t len) conn->fd, len, ret, strerror(errno), errno); break; } else { - sleep(1); + struct timespec t1 = { + .tv_sec = 0, + .tv_nsec = 1000 * 1000 * 10, + }; + struct timespec t2 = { 0 }; + nanosleep(&t1, &t2); retry++; zlog_warn(conn->param.log, "not all data send, retry: %d, ret: "