mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-25 05:54:19 +00:00
Retry pools after a delay of 15 seconds if none can be contacted on startup unless a key is pressed.
This commit is contained in:
parent
9087345f84
commit
3e527c6af5
9
main.c
9
main.c
@ -5569,6 +5569,7 @@ int main (int argc, char *argv[])
|
|||||||
/* We use the getq mutex as the staged lock */
|
/* We use the getq mutex as the staged lock */
|
||||||
stgd_lock = &getq->mutex;
|
stgd_lock = &getq->mutex;
|
||||||
|
|
||||||
|
retry_pools:
|
||||||
/* Test each pool to see if we can retrieve and use work and for what
|
/* Test each pool to see if we can retrieve and use work and for what
|
||||||
* it supports */
|
* it supports */
|
||||||
for (i = 0; i < total_pools; i++) {
|
for (i = 0; i < total_pools; i++) {
|
||||||
@ -5601,8 +5602,12 @@ int main (int argc, char *argv[])
|
|||||||
applog(LOG_WARNING, "Pool: %d URL: %s User: %s Password: %s",
|
applog(LOG_WARNING, "Pool: %d URL: %s User: %s Password: %s",
|
||||||
i, pool->rpc_url, pool->rpc_user, pool->rpc_pass);
|
i, pool->rpc_url, pool->rpc_user, pool->rpc_pass);
|
||||||
}
|
}
|
||||||
curses_input("Press enter to exit");
|
halfdelay(150);
|
||||||
quit(0, "No servers could be used! Exiting.");
|
applog(LOG_ERR, "Press any key to exit, or cgminer will try again in 15s.");
|
||||||
|
if (getch() != ERR)
|
||||||
|
quit(0, "No servers could be used! Exiting.");
|
||||||
|
nocbreak();
|
||||||
|
goto retry_pools;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_donation > 0.0) {
|
if (opt_donation > 0.0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user