diff --git a/src/local.c b/src/local.c index 8949be17..24d49028 100644 --- a/src/local.c +++ b/src/local.c @@ -615,9 +615,6 @@ static void accept_cb (EV_P_ ev_io *w, int revents) { hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; int index = rand() % listener->remote_num; - if (verbose) { - LOGD("connect to remote: %s", listener->remote_host[index]); - } int err = getaddrinfo(listener->remote_host[index], listener->remote_port, &hints, &res); if (err) { ERROR("getaddrinfo"); diff --git a/src/udprelay.c b/src/udprelay.c index c23bf8d3..63ae10a2 100644 --- a/src/udprelay.c +++ b/src/udprelay.c @@ -380,6 +380,10 @@ static void remote_recv_cb (EV_P_ ev_io *w, int revents) { return; } + if (verbose) { + LOGD("[udp] remote receive a packet"); + } + // triger the timer ev_timer_again(EV_A_ &remote_ctx->watcher); @@ -400,10 +404,6 @@ static void remote_recv_cb (EV_P_ ev_io *w, int revents) { goto CLEAN_UP; } - if (verbose) { - LOGD("[udp] remote receive a packet."); - } - #ifdef UDPRELAY_LOCAL buf = ss_decrypt_all(BUF_SIZE, buf, &buf_len, server_ctx->method);