Bug 1390447 - Check for WSA_IO_INCOMPLETE error after GetOverlappedResult. r=mayhemer
authorDragana Damjanovic dd.mozilla@gmail.com
Tue, 15 Aug 2017 16:41:47 +0200
changeset 374875 1619307e154a9424d3dc6cfd4a67b513f3ce69c4
parent 374874 4fb119706335b308f049949e5641565b035e4f80
child 374876 a8b0238e34be2eb2bc34e6d76fff49cdfcd65272
push id32340
push userkwierso@gmail.com
push dateWed, 16 Aug 2017 02:03:08 +0000
treeherdermozilla-central@4e93516e92e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmayhemer
bugs1390447
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1390447 - Check for WSA_IO_INCOMPLETE error after GetOverlappedResult. r=mayhemer
netwerk/base/nsSocketTransport2.cpp
netwerk/base/nsSocketTransportService2.cpp
--- a/netwerk/base/nsSocketTransport2.cpp
+++ b/netwerk/base/nsSocketTransport2.cpp
@@ -3488,17 +3488,17 @@ nsSocketTransport::CloseSocket(PRFileDes
         if (GetOverlappedResult((HANDLE) osfd, ol, &rvSent, FALSE) == TRUE) {
             SOCKET_LOG(("nsSocketTransport::CloseSocket - "
                         "GetOverlappedResult done\n"));
             canClose = true;
         } else {
             int err = WSAGetLastError();
             SOCKET_LOG(("nsSocketTransport::CloseSocket - "
                         "GetOverlappedResult err=%x\n", err));
-            if (err != ERROR_IO_PENDING) {
+            if (err != ERROR_IO_INCOMPLETE) {
                 canClose = true;
             }
         }
 
       } else {
         SOCKET_LOG(("nsSocketTransport::CloseSocket - no overlapped struct\n"));
         canClose = true;
       }
--- a/netwerk/base/nsSocketTransportService2.cpp
+++ b/netwerk/base/nsSocketTransportService2.cpp
@@ -1733,17 +1733,17 @@ nsSocketTransportService::CheckOverlappe
             if (GetOverlappedResult((HANDLE)osfd, ol, &rvSent, FALSE) == TRUE) {
                 SOCKET_LOG(("STS CheckOverlappedPendingSocketsAreDone "
                             "GetOverlappedResult succeeded\n"));
                 canClose = true;
             } else {
                 int err = WSAGetLastError();
                 SOCKET_LOG(("STS CheckOverlappedPendingSocketsAreDone "
                             "GetOverlappedResult failed error=%x \n", err));
-                if (err != ERROR_IO_PENDING) {
+                if (err != ERROR_IO_INCOMPLETE) {
                     canClose = true;
                 }
             }
         } else {
             canClose = true;
         }
 
         if (canClose) {