mirror of
https://github.com/yrutschle/sslh.git
synced 2026-10-22 18:12:10 +03:00
manage probing sockets in a specific list instead of searching through all connections
This commit is contained in:
1 parent
02f6c6999d
commit
b258b0e0f7
4 files changed
+83
-28
No files matched your search
+4
-2
@@ -80,8 +80,10 @@ struct connection* collection_alloc_cnx_from_fd(struct cnx_collection* collectio
|
||||
/* Remove a connection from the collection */
|
||||
int collection_remove_cnx(cnx_collection* collection, struct connection *cnx)
|
||||
{
|
||||
gap_set(collection->fd2cnx, cnx->q[0].fd, NULL);
|
||||
gap_set(collection->fd2cnx, cnx->q[1].fd, NULL);
|
||||
if (cnx->q[0].fd != -1)
|
||||
gap_set(collection->fd2cnx, cnx->q[0].fd, NULL);
|
||||
if (cnx->q[1].fd != -1)
|
||||
gap_set(collection->fd2cnx, cnx->q[1].fd, NULL);
|
||||
free(cnx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user