From Jérôme Duval <jerome.duval@xxxxxxxxx>:
Jérôme Duval has uploaded this change for review. (
https://review.haiku-os.org/c/haiku/+/2553 ;)
Change subject: tcp: set is_connected flag on our socket without parent too.
......................................................................
tcp: set is_connected flag on our socket without parent too.
a client non-blocking socket would otherwise looks non connected.
---
M src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp
1 file changed, 2 insertions(+), 3 deletions(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/53/2553/1
diff --git a/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp
b/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp
index 509f584..9640f8b 100644
--- a/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp
+++ b/src/add-ons/kernel/network/protocols/tcp/TCPEndpoint.cpp
@@ -1217,10 +1217,9 @@
fState = ESTABLISHED;
T(State(this));
- if (gSocketModule->has_parent(socket)) {
- gSocketModule->set_connected(socket);
+ gSocketModule->set_connected(socket);
+ if (gSocketModule->has_parent(socket))
release_sem_etc(fAcceptSemaphore, 1, B_DO_NOT_RESCHEDULE);
- }
fSendCondition.NotifyAll();
gSocketModule->notify(socket, B_SELECT_WRITE, fSendQueue.Free());
--
To view, visit https://review.haiku-os.org/c/haiku/+/2553
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I077c0b61a5dbaa8df350185c8a9259fd81dab342
Gerrit-Change-Number: 2553
Gerrit-PatchSet: 1
Gerrit-Owner: Jérôme Duval <jerome.duval@xxxxxxxxx>
Gerrit-MessageType: newchange