Skip to content

Commit

Permalink
Fix wrong close on recent commit 5a6efec
Browse files Browse the repository at this point in the history
  • Loading branch information
stephane committed Nov 28, 2022
1 parent 92dca47 commit 46c43ee
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/modbus-tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,7 @@ int modbus_tcp_listen(modbus_t *ctx, int nb_connection)
if (ctx->debug) {
fprintf(stderr, "Invalid IP address: %s\n", ctx_tcp->ip);
}
close(ctx->s);
ctx->s = -1;
close(new_s);
return -1;
}
}
Expand Down

0 comments on commit 46c43ee

Please sign in to comment.