Skip to content

Commit

Permalink
out_forward: fix connection leak on successfull flush (fix #234)
Browse files Browse the repository at this point in the history
In recent changes, the function call to release the upstream connection
when the data is flushed was commented, for hence the connection is leaked.

This patch fix the problem releasing the connection properly.

Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Apr 12, 2017
1 parent 89b6cc8 commit c54601d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plugins/out_forward/forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,8 @@ void cb_forward_flush(void *data, size_t bytes,
}

total += bytes_sent;
//flb_upstream_conn_release(u_conn);
flb_upstream_conn_release(u_conn);

flb_trace("[out_fw] ended write()=%d bytes", total);

FLB_OUTPUT_RETURN(FLB_OK);
Expand Down

0 comments on commit c54601d

Please sign in to comment.