Skip to content

Commit

Permalink
in_forward: Remove a needless add event for handling sockets
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored and edsiper committed Dec 13, 2024
1 parent 500242d commit 470bb18
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions plugins/in_forward/fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,30 +388,13 @@ static void in_fw_pause(void *data, struct flb_config *config)
}

static void in_fw_resume(void *data, struct flb_config *config) {
struct flb_connection *connection;
struct fw_conn *conn;
struct flb_in_fw_config *ctx = data;
if (config->is_running == FLB_TRUE) {
if (pthread_mutex_lock(&ctx->conn_mutex)) {
connection = flb_downstream_conn_get(ctx->downstream);
if (connection == NULL) {
flb_plg_error(ctx->ins, "could not accept new connection");

return;
}

conn = fw_conn_add(connection, ctx);
if (!conn) {
flb_plg_error(ctx->ins, "could not add connection");

return;
}

flb_input_collector_resume(ctx->coll_fd, ctx->ins);
ctx->is_paused = FLB_FALSE;
}
pthread_mutex_unlock(&ctx->conn_mutex);

}
}

Expand Down

0 comments on commit 470bb18

Please sign in to comment.