diff --git a/src/main.c b/src/main.c index 4b2cafc..b4782c3 100644 --- a/src/main.c +++ b/src/main.c @@ -1180,11 +1180,11 @@ int main (int argc, char **argv) tun.read.write += r; } - - if _1_(!stop_loop) - gt_encrypt(&ctx, &sock.write, &tun.read); } + if _1_(!stop_loop) + gt_encrypt(&ctx, &sock.write, &tun.read); + if (buffer_read_size(&sock.write)) { const ssize_t r = fd_write(sock.fd, sock.write.read, buffer_read_size(&sock.write));