aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Washburn <development@efficientek.com>2022-03-18 01:51:32 -0500
committerDaniel Kiper <daniel.kiper@oracle.com>2022-04-04 19:43:35 +0200
commit848724273e4c3bac7ff88b21a8abd764ada57b9c (patch)
tree951c6a7421d66d94a582708d2fa1b5c887ed16f9
parentc1428350438a0f76e238785d9d1d16f7f1b3d85f (diff)
downloadgrub-848724273e4c3bac7ff88b21a8abd764ada57b9c.tar.gz
net/net: Avoid unnecessary calls to grub_net_tcp_retransmit()
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. So no need to go through that logic. Signed-off-by: Glenn Washburn <development@efficientek.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
-rw-r--r--grub-core/net/net.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index 3eac83d16..11b39877b 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 == NULL)
+ grub_net_tcp_retransmit ();
}
/* Read from the packets list*/