Set sockd to false should curl setup fail on stratum.
diff --git a/util.c b/util.c
index 7ae378a..fad9b08 100644
--- a/util.c
+++ b/util.c
@@ -1522,8 +1522,10 @@ bool initiate_stratum(struct pool *pool)
int n2size;
resend:
- if (!setup_stratum_curl(pool))
+ if (!setup_stratum_curl(pool)) {
+ sockd = false;
goto out;
+ }
sockd = true;