mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 12:08:14 +00:00
LibCore+LibHTTP: Check the status of the socket after EINPROGRESS
Previously the system would assume the socket was connected after the file descriptor became writeable. Just because the fd is signaled as ready for output does not necessarily indicate the socket is connected. Instead, we should check the status of the socket with SO_ERROR and handle successes/errors accordingly.
This commit is contained in:
parent
6743170f4e
commit
d456af1cd3
3 changed files with 30 additions and 6 deletions
|
@ -43,6 +43,7 @@ public:
|
|||
int destination_port() const { return m_destination_port; }
|
||||
|
||||
Function<void()> on_connected;
|
||||
Function<void()> on_error;
|
||||
Function<void()> on_ready_to_read;
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue