Improve documentation

This commit is contained in:
Soner Tari 2020-03-26 17:52:06 +03:00
parent 2af5d6ccbb
commit 59ead752b5
2 changed files with 5 additions and 0 deletions

View File

@ -1132,6 +1132,7 @@ protossl_fd_readcb(MAYBE_UNUSED evutil_socket_t fd, UNUSED short what, void *arg
#ifndef OPENSSL_NO_TLSEXT
// ctx->ev is NULL during initial conn setup
if (!ctx->ev) {
// THRMGR THREAD
/* for SSL, defer dst connection setup to initial_readcb */
ctx->ev = event_new(ctx->evbase, ctx->fd, EV_READ, ctx->protoctx->fd_readcb, ctx);
if (!ctx->ev)
@ -1155,6 +1156,7 @@ protossl_fd_readcb(MAYBE_UNUSED evutil_socket_t fd, UNUSED short what, void *arg
// @attention This is the thrmgr thread, do not do anything else with the conn after adding the event, just return
return;
}
// CONN HANDLING THREAD
// From this point on is the connection handling thread (not the thrmgr thread)
pxy_thrmgr_remove_pending_ssl_conn(ctx);

View File

@ -70,6 +70,7 @@
*/
#define OUTBUF_LIMIT (128*1024)
// getdtablecount() returns int, hence we don't use size_t here
int descriptor_table_size = 0;
// @attention The order of names should match the order in protocol enum
@ -1644,6 +1645,8 @@ pxy_conn_connect(pxy_conn_ctx_t *ctx)
}
}
// @attention Do not do anything with the conn ctx after this point on the thrmgr thread
// All SSL conns start running on their conn handling threads for sni peek before they reach here, not on the thrmgr thread,
// so the comments above are true for non-SSL conns only, but we treat all conns the same way
}
#if defined(__OpenBSD__) || defined(__linux__)