Skip to content

Commit

Permalink
fixme/todo cleanup
Browse files Browse the repository at this point in the history
not much worth doing right now.
  • Loading branch information
dormando committed May 23, 2024
1 parent 1c570a6 commit e9d2425
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 0 additions & 1 deletion proxy_network.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ void proxy_run_backend_queue(be_head_t *head) {
if (bec->connecting || bec->validating) {
P_DEBUG("%s: deferring IO pending connecting (%s:%s)\n", __func__, be->name, be->port);
} else {
// FIXME: doesn't work with tls disabled.
if (!bec->ssl) {
flags = _flush_pending_write(bec);
} else {
Expand Down
5 changes: 4 additions & 1 deletion proxy_tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* SSL_connect()) for defense against bugs in our code or OpenSSL.
*/

// TODO: int -> enum?
int mcp_tls_init(proxy_ctx_t *ctx) {
if (ctx->tls_ctx) {
return MCP_TLS_OK;
Expand Down Expand Up @@ -205,6 +204,10 @@ int mcp_tls_writev(struct mcp_backendconn_s *be, int iovcnt) {
proxy_event_thread_t *et = be->event_thread;
// TODO: move this to event thread init to remove branch and move error
// handling to startup time.
// Actually we won't know if TLS is in use until a backend shows up and
// tries to write... so I'm not sure where to move this. TLS compiled in
// but not used would waste memory.
// Maybe can at least mark it unlikely()?
if (et->tls_wbuf_size == 0) {
et->tls_wbuf_size = TLS_WBUF_SIZE;
et->tls_wbuf = malloc(et->tls_wbuf_size);
Expand Down

0 comments on commit e9d2425

Please sign in to comment.