Zebediah Figura : server: Clear the connection error after a successful connection.

Alexandre Julliard julliard at winehq.org
Wed Jul 7 15:01:29 CDT 2021


Module: wine
Branch: master
Commit: ddb922391512f4d596b604017b329536285e65a5
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=ddb922391512f4d596b604017b329536285e65a5

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Tue Jul  6 23:48:41 2021 -0500

server: Clear the connection error after a successful connection.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/ws2_32/tests/sock.c | 2 +-
 server/sock.c            | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 9e7cd3a1d39..75e83927007 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -3344,7 +3344,7 @@ static void test_select(void)
         id = 0xdeadbeef;
         ret = getsockopt(fdWrite, SOL_SOCKET, SO_ERROR, (char *)&id, &len);
         ok(!ret, "getsockopt failed with %d\n", WSAGetLastError());
-        todo_wine ok(!id, "got error %u\n", id);
+        ok(!id, "got error %u\n", id);
 
         closesocket(fdWrite);
 
diff --git a/server/sock.c b/server/sock.c
index 58e9cf4302a..5fdbf0bd9ba 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -983,7 +983,10 @@ static void sock_dispatch_events( struct sock *sock, enum connection_state prevs
 
     case SOCK_CONNECTING:
         if (event & POLLOUT)
+        {
             post_socket_event( sock, AFD_POLL_BIT_CONNECT, 0 );
+            sock->errors[AFD_POLL_BIT_CONNECT_ERR] = 0;
+        }
         if (event & (POLLERR | POLLHUP))
             post_socket_event( sock, AFD_POLL_BIT_CONNECT_ERR, error );
         break;




More information about the wine-cvs mailing list