mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:57:44 +00:00
Kernel: Fix race between accept() and connect().
We had a bug where an accepted socket would appear to be EOF/disconnected on the accepting side until the connecting side had called attach_fd(). Fix this by adding a new SocketRole::Connecting state.
This commit is contained in:
parent
31d3616027
commit
4aa0ab4e08
5 changed files with 14 additions and 4 deletions
|
@ -8,7 +8,7 @@
|
|||
#include <Kernel/UnixTypes.h>
|
||||
#include <Kernel/KResult.h>
|
||||
|
||||
enum class SocketRole { None, Listener, Accepted, Connected };
|
||||
enum class SocketRole { None, Listener, Accepted, Connected, Connecting };
|
||||
|
||||
class Socket : public Retainable<Socket> {
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue