Skip to content

Commit

Permalink
io: fix EINPROGRESS check, also check that errno is not zero (#2497)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <eduardo@treasure-data.com>
  • Loading branch information
edsiper committed Sep 6, 2020
1 parent 63b0577 commit 57e4d42
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flb_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ static int net_io_connect_async(struct flb_upstream *u,
* means a failure.
*/
err = flb_socket_error(u_conn->fd);
if (!FLB_EINPROGRESS(err)) {
if (!FLB_EINPROGRESS(err) && err != 0) {
flb_errno();
flb_error("[io] connection #%i failed to: %s:%i",
u_conn->fd, u->tcp_host, u->tcp_port);
Expand Down

0 comments on commit 57e4d42

Please sign in to comment.