Browse Source

Parse any extra data already in the cs buffer in proxy_recv before returning to the epoll loop

master
ckolivas 10 years ago
parent
commit
3fd9ead54a
  1. 6
      src/generator.c

6
src/generator.c

@ -1966,6 +1966,7 @@ static void *proxy_recv(void *arg)
disable_subproxy(gdata, proxi, subproxy); disable_subproxy(gdata, proxi, subproxy);
continue; continue;
} }
do {
if (parse_method(ckp, subproxy, cs->buf)) { if (parse_method(ckp, subproxy, cs->buf)) {
if (subproxy->reconnect) { if (subproxy->reconnect) {
/* Call this proxy dead to allow us to fail /* Call this proxy dead to allow us to fail
@ -1980,11 +1981,10 @@ static void *proxy_recv(void *arg)
} }
continue; continue;
} }
if (parse_share(subproxy, cs->buf)) {
continue;
}
/* If it's not a method it should be a share result */ /* If it's not a method it should be a share result */
if (!parse_share(subproxy, cs->buf))
LOGWARNING("Unhandled stratum message: %s", cs->buf); LOGWARNING("Unhandled stratum message: %s", cs->buf);
} while (read_socket_line(cs, 0) > 0);
} }
return NULL; return NULL;

Loading…
Cancel
Save