Peter M. Groen
/
libmodbus
Toggle navigation
Sign in
Sign in
Project
Files
Commits
Network
Graphs
Milestones
Issues
0
Merge Requests
0
Labels
Wiki
Download as
Email Patches
Plain Diff
Browse Code »
Commit
46c43ee828be268651c441475d9b6cd441576644
Authored by
Stéphane Raimbault
2022-11-28 11:10:18 +0100
1 parent
92dca473
Fix wrong close on recent commit
5a6efec
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
2 deletions
src/modbus-tcp.c
src/modbus-tcp.c
View file @
46c43ee
...
...
@@ -556,8 +556,7 @@ int modbus_tcp_listen(modbus_t *ctx, int nb_connection)
556
556
if (ctx->debug) {
557
557
fprintf(stderr, "Invalid IP address: %s\n", ctx_tcp->ip);
558
558
}
559
- close(ctx->s);
560
- ctx->s = -1;
559
+ close(new_s);
561
560
return -1;
562
561
}
563
562
}
...
...