Skip to content

Commit 53bd6cc

Browse files
committed
input: remove second close on collector timer during destruction to avoid double-closing
Signed-off-by: Eduardo Silva <[email protected]>
1 parent 470d4b5 commit 53bd6cc

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/flb_input.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2007,7 +2007,6 @@ int flb_input_collector_destroy(struct flb_input_collector *coll)
20072007
if (coll->type == FLB_COLLECT_TIME) {
20082008
if (coll->fd_timer > 0) {
20092009
mk_event_timeout_destroy(config->evl, &coll->event);
2010-
mk_event_closesocket(coll->fd_timer);
20112010
}
20122011
}
20132012
else {
@@ -2022,7 +2021,6 @@ int flb_input_collector_destroy(struct flb_input_collector *coll)
20222021
int flb_input_collector_pause(int coll_id, struct flb_input_instance *in)
20232022
{
20242023
int ret;
2025-
flb_pipefd_t fd;
20262024
struct flb_input_collector *coll;
20272025

20282026
coll = get_collector(coll_id, in);
@@ -2043,10 +2041,8 @@ int flb_input_collector_pause(int coll_id, struct flb_input_instance *in)
20432041
* Note: Invalidate fd_timer first in case closing a socket
20442042
* invokes another event.
20452043
*/
2046-
fd = coll->fd_timer;
20472044
coll->fd_timer = -1;
20482045
mk_event_timeout_destroy(coll->evl, &coll->event);
2049-
mk_event_closesocket(fd);
20502046
}
20512047
else if (coll->type & (FLB_COLLECT_FD_SERVER | FLB_COLLECT_FD_EVENT)) {
20522048
ret = mk_event_del(coll->evl, &coll->event);

0 commit comments

Comments
 (0)