Remove the ability to disable longpoll. It is not a useful feature and will conflict with planned changes to longpoll code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
diff --git a/README b/README
index c9c6eb4..4298eca 100644
--- a/README
+++ b/README
@@ -133,7 +133,6 @@ Options for both config file and command line:
--log|-l <arg> Interval in seconds between log output (default: 5)
--monitor|-m <arg> Use custom pipe cmd for output messages
--net-delay Impose small delays in networking to not overload slow routers
---no-longpoll Disable X-Long-Polling support
--pass|-p <arg> Password for bitcoin JSON-RPC server
--per-device-stats Force verbose mode and output per-device statistics
--protocol-dump|-P Verbose dump of protocol-level activities
diff --git a/cgminer.c b/cgminer.c
index f596540..47a43be 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -81,7 +81,6 @@ int gpu_threads;
bool opt_protocol = false;
static bool opt_benchmark;
-static bool want_longpoll = true;
static bool have_longpoll = false;
static bool want_per_device_stats = false;
bool use_syslog = false;
@@ -850,9 +849,6 @@ static struct opt_table opt_config_table[] = {
opt_hidden
#endif
),
- OPT_WITHOUT_ARG("--no-longpoll",
- opt_set_invbool, &want_longpoll,
- "Disable X-Long-Polling support"),
OPT_WITHOUT_ARG("--no-restart",
opt_set_invbool, &opt_restart,
#ifdef HAVE_OPENCL
@@ -2019,7 +2015,7 @@ static void *get_work_thread(void *userdata)
struct work *ret_work;
int failures = 0;
- if (unlikely(want_longpoll && !pool->is_lp && pool == current_pool() &&
+ if (unlikely(!pool->is_lp && pool == current_pool() &&
pool->hdr_path && !pool_tset(pool, &pool->lp_sent))) {
stop_longpoll();
start_longpoll();
@@ -2941,7 +2937,6 @@ static void set_options(void)
immedok(logwin, true);
clear_logwin();
retry:
- wlogprint("\n[L]ongpoll: %s\n", want_longpoll ? "On" : "Off");
wlogprint("[Q]ueue: %d\n[S]cantime: %d\n[E]xpiry: %d\n[R]etries: %d\n"
"[P]ause: %d\n[W]rite config file\n[C]gminer restart\n",
opt_queue, opt_scantime, opt_expiry, opt_retries, opt_fail_pause);
@@ -2956,15 +2951,6 @@ retry:
}
opt_queue = selected;
goto retry;
- } else if (!strncasecmp(&input, "l", 1)) {
- want_longpoll ^= true;
- applog(LOG_WARNING, "Longpoll %s", want_longpoll ? "enabled" : "disabled");
- if (!want_longpoll) {
- if (have_longpoll)
- stop_longpoll();
- } else
- start_longpoll();
- goto retry;
} else if (!strncasecmp(&input, "s", 1)) {
selected = curses_int("Set scantime in seconds");
if (selected < 0 || selected > 9999) {
@@ -4693,7 +4679,6 @@ int main(int argc, char *argv[])
if (opt_benchmark) {
struct pool *pool;
- want_longpoll = false;
pool = calloc(sizeof(struct pool), 1);
pool->pool_no = 0;
pools[total_pools++] = pool;
@@ -4985,8 +4970,7 @@ int main(int argc, char *argv[])
}
} while (!pools_active);
- if (want_longpoll)
- start_longpoll();
+ start_longpoll();
begin_bench:
total_mhashes_done = 0;