diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-24 06:19:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-24 06:19:45 +0000 |
commit | efe769c42efe29f3b7a602a63357a1925b626a24 (patch) | |
tree | e484acdfea9137d1e2d70b30e94dca2e652171fb /src/net_doh.c | |
parent | Releasing debian version 2.11.2-1. (diff) | |
download | dnsperf-efe769c42efe29f3b7a602a63357a1925b626a24.tar.xz dnsperf-efe769c42efe29f3b7a602a63357a1925b626a24.zip |
Merging upstream version 2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/net_doh.c')
-rw-r--r-- | src/net_doh.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net_doh.c b/src/net_doh.c index dafd736..2caeab8 100644 --- a/src/net_doh.c +++ b/src/net_doh.c @@ -100,7 +100,7 @@ struct perf__doh_socket { bool is_ready, is_conn_ready, is_ssl_ready, is_sending, is_post_sending; // bool have_more; TODO - bool do_reconnect; + bool do_reconnect, do_connect; perf_sockaddr_t server, local; size_t bufsize; @@ -254,7 +254,7 @@ static void perf__doh_reconnect(struct perf_net_socket* sock) self->http2_code = 0; self->http2_is_dns = false; - perf__doh_connect(sock); + self->do_connect = true; } // static ssize_t _recv_callback(nghttp2_session *session, uint8_t *buf, size_t length, int flags, void *sock) @@ -623,6 +623,10 @@ static int perf__doh_sockready(struct perf_net_socket* sock, int pipe_fd, int64_ perf__doh_reconnect(sock); self->do_reconnect = false; } + if (self->do_connect) { + perf__doh_connect(sock); + self->do_connect = false; + } if (self->is_ready) { // do nghttp2 I/O send to flush outstanding frames |