mirror of
https://github.com/tezc/sc.git
synced 2025-01-28 07:03:06 +08:00
save error message if close on sock_poll fails
This commit is contained in:
parent
e39a8fb2d2
commit
7af766e1d5
@ -1143,7 +1143,11 @@ int sc_sock_poll_term(struct sc_sock_poll *p)
|
||||
}
|
||||
|
||||
sc_sock_free(p->events);
|
||||
|
||||
rc = close(p->fds);
|
||||
if (rc != 0) {
|
||||
sc_sock_poll_set_err(p, strerror(errno));
|
||||
}
|
||||
|
||||
*p = (struct sc_sock_poll){0};
|
||||
|
||||
@ -1367,7 +1371,11 @@ int sc_sock_poll_term(struct sc_sock_poll *p)
|
||||
}
|
||||
|
||||
sc_sock_free(p->events);
|
||||
|
||||
rc = close(p->fds);
|
||||
if (rc != 0) {
|
||||
sc_sock_poll_set_err(p, strerror(errno));
|
||||
}
|
||||
|
||||
*p = (struct sc_sock_poll){0};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user