Kernel: Ignore allocation failures when trying to retransmit packets
We ignore allocation failures above the first 16 guaranteed socket slots, as we will just retransmit their packets the next time around.
This commit is contained in:
parent
2dc91865a4
commit
e5e7cb822a
Notes:
sideshowbarker
2024-07-17 19:49:52 +09:00
Author: https://github.com/IdanHo Commit: https://github.com/SerenityOS/serenity/commit/e5e7cb822a7 Pull-request: https://github.com/SerenityOS/serenity/pull/12275
1 changed files with 3 additions and 1 deletions
|
@ -651,7 +651,9 @@ void retransmit_tcp_packets()
|
|||
// in case retransmit_packets() realizes that it wants to close the socket.
|
||||
NonnullRefPtrVector<TCPSocket, 16> sockets;
|
||||
TCPSocket::sockets_for_retransmit().for_each_shared([&](const auto& socket) {
|
||||
sockets.append(socket);
|
||||
// We ignore allocation failures above the first 16 guaranteed socket slots, as
|
||||
// we will just retransmit their packets the next time around
|
||||
(void)sockets.try_append(socket);
|
||||
});
|
||||
|
||||
for (auto& socket : sockets) {
|
||||
|
|
Loading…
Add table
Reference in a new issue