mirror of
https://github.com/LBRYFoundation/pool.git
synced 2025-08-23 17:37:25 +00:00
stratum: fix the major socket leak on bad auth
This commit is contained in:
parent
befb105e5d
commit
c49c8b30f2
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue