Skip to content

Commit

Permalink
doveadm: Outgoing dsync TCP connections leaked socket
Browse files Browse the repository at this point in the history
If doveadm-server was running with service_count>1, each dsync run leaked a
socket.
  • Loading branch information
sirainen committed Jan 17, 2017
1 parent f9f08e1 commit 9e01752
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/doveadm/doveadm-dsync.c
Expand Up @@ -493,6 +493,9 @@ cmd_dsync_icb_stream_init(struct dsync_cmd_context *ctx,
ctx->input = i_stream_create_fd(ctx->fd_in, (size_t)-1, FALSE);
ctx->output = o_stream_create_fd(ctx->fd_out, (size_t)-1, FALSE);
} else {
i_assert(ctx->fd_in == -1 && ctx->fd_out == -1);
ctx->fd_in = i_stream_get_fd(ctx->input);
ctx->fd_out = o_stream_get_fd(ctx->output);
ctx->input_orig_bufsize = i_stream_get_max_buffer_size(ctx->input);
ctx->output_orig_bufsize = o_stream_get_max_buffer_size(ctx->output);
i_stream_set_max_buffer_size(ctx->input, (size_t)-1);
Expand Down

0 comments on commit 9e01752

Please sign in to comment.