[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/3] net: Avoid unnecessary calls to grub_net_tcp_retransmit
From: |
Glenn Washburn |
Subject: |
[PATCH 2/3] net: Avoid unnecessary calls to grub_net_tcp_retransmit |
Date: |
Tue, 8 Mar 2022 15:20:19 -0600 |
In grub_net_poll_cards_idle_real, only call grub_net_tcp_retransmit if there
are network cards found. If there are no network card found, there can be no
tcp sockets to transmit on.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
grub-core/net/net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index 563dea9ec8..e208b84019 100644
--- a/grub-core/net/net.c
+++ b/grub-core/net/net.c
@@ -1580,7 +1580,8 @@ grub_net_poll_cards_idle_real (void)
|| ctime >= card->last_poll + card->idle_poll_delay_ms)
receive_packets (card, 0);
}
- grub_net_tcp_retransmit ();
+ if (grub_net_cards)
+ grub_net_tcp_retransmit ();
}
/* Read from the packets list*/
--
2.27.0