diff --git a/src/connector.c b/src/connector.c index 3cf780cf..6ac551be 100644 --- a/src/connector.c +++ b/src/connector.c @@ -1234,11 +1234,10 @@ static bool setup_upstream(ckpool_t *ckp, cdata_t *cdata) cksem_init(&cs->sem); cksem_post(&cs->sem); - /* Must succeed on initial connect to upstream pool */ - if (!connect_upstream(ckp, cs)) { - LOGEMERG("Failed initial connect to upstream server %s:%s", cs->url, cs->port); - goto out; - } + + while (!connect_upstream(ckp, cs)) + cksleep_ms(5000); + create_pthread(&pth, urecv_process, ckp); cdata->upstream_sends = create_ckmsgq(ckp, "usender", &usend_process); ret = true; diff --git a/src/stratifier.c b/src/stratifier.c index 8c8e82d5..114626c5 100644 --- a/src/stratifier.c +++ b/src/stratifier.c @@ -8218,6 +8218,8 @@ void *stratifier(void *arg) /* Wait for the generator to have something for us */ while (!ckp->proxy && !ckp->generator_ready) cksleep_ms(10); + while (ckp->remote && !ckp->connector_ready) + cksleep_ms(10); if (!ckp->proxy) { if (!generator_checkaddr(ckp, ckp->btcaddress)) {