mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-01-10 23:43:47 +00:00
IPC: remove fd from poll loop in the disconnect
Until now we have been relying on getting a POLLHUP, but under heavy load we seem to get an old poll event that cause a double deref of the connection object. Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
c3eb1be7ed
commit
fa70ec98e8
@ -499,6 +499,7 @@ qb_ipcs_disconnect(struct qb_ipcs_connection *c)
|
||||
c->state = QB_IPCS_CONNECTION_INACTIVE;
|
||||
c->service->stats.closed_connections++;
|
||||
if (c->service->needs_sock_for_poll && c->setup.u.us.sock > 0) {
|
||||
(void)c->service->poll_fns.dispatch_del(c->setup.u.us.sock);
|
||||
qb_ipcc_us_sock_close(c->setup.u.us.sock);
|
||||
c->setup.u.us.sock = -1;
|
||||
qb_ipcs_connection_unref(c);
|
||||
@ -510,6 +511,7 @@ qb_ipcs_disconnect(struct qb_ipcs_connection *c)
|
||||
c->service->stats.closed_connections++;
|
||||
|
||||
if (c->service->needs_sock_for_poll && c->setup.u.us.sock > 0) {
|
||||
(void)c->service->poll_fns.dispatch_del(c->setup.u.us.sock);
|
||||
qb_ipcc_us_sock_close(c->setup.u.us.sock);
|
||||
c->setup.u.us.sock = -1;
|
||||
qb_ipcs_connection_unref(c);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user