tcp: coverity don't close(-1)
This commit is contained in:
parent
d5712f1031
commit
d4611d147c
1 changed files with 2 additions and 1 deletions
|
@ -730,7 +730,8 @@ tcp_server_done(void)
|
|||
LIST_FOREACH(tsl, &tcp_server_active, alink) {
|
||||
if (tsl->ops.cancel)
|
||||
tsl->ops.cancel(tsl->opaque);
|
||||
close(tsl->fd);
|
||||
if (tsl->fd >= 0)
|
||||
close(tsl->fd);
|
||||
tsl->fd = -1;
|
||||
pthread_kill(tsl->tid, SIGTERM);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue