Browse Source

Test for dropped clients before not authorised ones

master
Con Kolivas 10 years ago
parent
commit
ecc4482b79
  1. 12
      src/stratifier.c

12
src/stratifier.c

@ -1824,6 +1824,12 @@ static void stratum_broadcast(sdata_t *sdata, json_t *val)
if (sdata != ckp_sdata && client->sdata != sdata)
continue;
/* Look for clients that may have been dropped which the stratifer has
* not been informed about and ask the connector of they still exist */
if (client->dropped) {
connector_test_client(ckp, client->id);
continue;
}
/* Test for clients that haven't authed in over a minute and drop them */
if (!client->authorised) {
if (now_t > client->start_time + 60) {
@ -1832,12 +1838,6 @@ static void stratum_broadcast(sdata_t *sdata, json_t *val)
}
continue;
}
/* Look for clients that may have been dropped which the stratifer has
* not been informed about and ask the connector of they still exist */
if (client->dropped) {
connector_test_client(ckp, client->id);
continue;
}
if (client->reconnect) {
reconnect_client(ckp_sdata, client);
continue;

Loading…
Cancel
Save