pcu_sock.c: Call osmo_fd_unregister() before closing and changing bfd->fd

Change-Id: I4f72f4fa80249ed2caafc87b9fdf9926e0f31976
This commit is contained in:
Pau Espin 2023-03-14 11:26:55 +01:00 committed by fixeria
parent 646d21f2db
commit 9c21dc3d16
1 changed files with 1 additions and 1 deletions

View File

@ -759,9 +759,9 @@ static void pcu_sock_close(struct pcu_sock_state *state)
LOGP(DPCU, LOGL_NOTICE, "PCU socket has LOST connection\n");
osmo_fd_unregister(bfd);
close(bfd->fd);
bfd->fd = -1;
osmo_fd_unregister(bfd);
/* re-enable the generation of ACCEPT for new connections */
osmo_fd_read_enable(&state->listen_bfd);