For the us_socket_close_connecting and us_socket_close part, the wordings are true 4 years ago, but later changes make it not accurate.
So, this pull request modified the comments.
Of course, if extracting the common logics like below, the comments could be removed without confusion.
void us_internal_socket_finalize(int ssl, struct us_socket_t *s) {
/* Link this socket to the close-list and let it be deleted after this iteration */
s->next = s->context->loop->data.closed_head;
s->context->loop->data.closed_head = s;
/* Any socket with prev = context is marked as closed */
s->prev = (struct us_socket_t *) s->context;
}
For the us_socket_close_connecting and us_socket_close part, the wordings are true 4 years ago, but later changes make it not accurate.
So, this pull request modified the comments.
Of course, if extracting the common logics like below, the comments could be removed without confusion.