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

Change-Id: Iec0faba781bcb2bc6de8710392655785790b9af4
This commit is contained in:
Pau Espin 2023-03-14 11:13:31 +01:00
parent db5ac8ddd5
commit 93d7ece833
1 changed files with 1 additions and 1 deletions

View File

@ -96,9 +96,9 @@ static void pcu_sock_close(int lost)
LOGP(DL1IF, LOGL_NOTICE, "PCU socket has %s connection\n",
(lost) ? "LOST" : "closed");
osmo_fd_unregister(bfd);
close(bfd->fd);
bfd->fd = -1;
osmo_fd_unregister(bfd);
/* flush the queue */
while (!llist_empty(&pcu_sock_state.upqueue)) {