mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Kernel: Don't put closed/listener sockets into the closing_sockets list
This commit is contained in:
parent
d8f92bdf96
commit
866e577f1d
Notes:
sideshowbarker
2024-07-18 18:51:22 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/866e577f1d6 Pull-request: https://github.com/SerenityOS/serenity/pull/6762
1 changed files with 4 additions and 2 deletions
|
@ -471,8 +471,10 @@ KResult TCPSocket::close()
|
|||
set_state(State::LastAck);
|
||||
}
|
||||
|
||||
Locker locker(closing_sockets().lock());
|
||||
closing_sockets().resource().set(tuple(), *this);
|
||||
if (state() != State::Closed && state() != State::Listen) {
|
||||
Locker locker(closing_sockets().lock());
|
||||
closing_sockets().resource().set(tuple(), *this);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue