author | Liang-Heng Chen <xeonchen@mozilla.com> |
Wed, 19 Oct 2016 18:28:02 +0800 (2016-10-19) | |
changeset 318759 | df49275ec24cf78028bcba9ecdd85334350c19f8 |
parent 318758 | 4adb7daf5033d99baf8c55483ea7d628f4693424 |
child 318760 | c249f55213b6acad8f39579d732a2fc0745e0d47 |
push id | 30852 |
push user | cbook@mozilla.com |
push date | Fri, 21 Oct 2016 14:55:15 +0000 (2016-10-21) |
treeherder | mozilla-central@fcadf6ec5ccf [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bagder |
bugs | 1311044 |
milestone | 52.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
|
--- a/netwerk/socket/nsSOCKSIOLayer.cpp +++ b/netwerk/socket/nsSOCKSIOLayer.cpp @@ -508,20 +508,26 @@ nsSOCKSSocketInfo::ConnectToProxy(PRFile NetAddr proxy = mInternalProxyAddr; FixupAddressFamily(fd, &proxy); PRNetAddr prProxy; NetAddrToPRNetAddr(&proxy, &prProxy); status = fd->lower->methods->connect(fd->lower, &prProxy, mTimeout); if (status != PR_SUCCESS) { PRErrorCode c = PR_GetError(); + // If EINPROGRESS, return now and check back later after polling if (c == PR_WOULD_BLOCK_ERROR || c == PR_IN_PROGRESS_ERROR) { mState = SOCKS_CONNECTING_TO_PROXY; return status; + } else if (IsHostDomainSocket()) { + LOGERROR(("socks: connect to domain socket failed (%d)", c)); + PR_SetError(PR_CONNECT_REFUSED_ERROR, 0); + mState = SOCKS_FAILED; + return status; } } } while (status != PR_SUCCESS); // Connected now, start SOCKS if (mVersion == 4) return WriteV4ConnectRequest(); return WriteV5AuthRequest();