X-Git-Url: https://git.distorted.org.uk/~mdw/yaid/blobdiff_plain/95df134c16f744e4ca2f65a0e4823c4a96b8f5b7..79805e61788e52f2cf8b6563b3656d5e40529d09:/yaid.c diff --git a/yaid.c b/yaid.c index bdfdd93..fc6ddd4 100644 --- a/yaid.c +++ b/yaid.c @@ -380,6 +380,8 @@ static void proxy_query(struct client *c) s.port = 113; c->l->ao->socket_to_sockaddr(&s, &ss, &ssz); selbuf_disable(&c->b); + c->px = px; px->c = c; + px->fd = -1; if (conn_init(&px->cn, &sel, fd, (struct sockaddr *)&ss, ssz, proxy_connected, px)) { logmsg(&c->q, LOG_ERR, "failed to make %s proxy connection to %s: %s", @@ -387,8 +389,6 @@ static void proxy_query(struct client *c) goto err_2; } - c->px = px; px->c = c; - px->fd = -1; return; err_2: