stratum: fix the major socket leak on bad auth

This commit is contained in:
Tanguy Pruvot 2018-03-02 13:16:06 +01:00
parent befb105e5d
commit c49c8b30f2

View file

@ -619,9 +619,7 @@ void *client_thread(void *p)
else if(!strcmp(method, "getwork"))
{
clientlog(client, "using getwork"); // client using http:// url
break;
}
else
{
b = client_send_error(client, 20, "Not supported");
@ -657,6 +655,9 @@ void *client_thread(void *p)
db_clear_worker(g_db, client);
CommonUnlock(&g_db_mutex);
}
} else {
// only clients sockets in g_list_client are purged (if marked deleted)
socket_close(client->sock);
}
object_delete(client);