Closed Bug 1386719 Opened 7 years ago Closed 7 years ago

If poll returns PR_POLL_EXCEPT during ConnectEx on windows check OVERLAPPED as well

Categories

(NSPR :: NSPR, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dragana, Assigned: dragana)

References

Details

Attachments

(1 file, 2 obsolete files)

This is nspr fix for bug 1385116
Component: Libraries → NSPR
Product: NSS → NSPR
Version: trunk → other
Also I found out that ConnectEx returns ERROR_CONNECTION_REFUSED from call WSAGetLastError().
ERROR_CONNECTION_REFUSED is not a WSA error and it does not have the same value as WSAECONNREFUSED.

_PR_MD_MAP_CONNECT_ERROR does not recognize ERROR_CONNECTION_REFUSED. I am not sure if this is happening with other error and it is hard to trigger, to investigate.
Attached patch bug_1386719_v1.patch (obsolete) — Splinter Review
Attachment #8893435 - Flags: review?(honzab.moz)
this was not happening on my VM and one other computer. and it is not happening for a lot pf people. At least we have only one bug: bug 1385116 and out try servers.
Attachment #8893435 - Flags: review?(honzab.moz) → review+
Blocks: 1382702
Attached patch bug_1386719_v1.patch (obsolete) — Splinter Review
I needed to extend the error list.
in bug 1385116, the reporter is seeing error ERROR_INVALID_NETNAME (1214).

I have added some other error. If you think they are not correct please let me know, maybe I made a necko patch that retries connection without TFO if PR_ContinueConnect error is PR_UNKNOWN_ERROR (i.e. if we cannot decode non WSA error)
Attachment #8893435 - Attachment is obsolete: true
Attachment #8895264 - Flags: review?(kaie)
Attachment #8895264 - Flags: review?(honzab.moz)
Attachment #8895264 - Flags: review?(honzab.moz) → review+
Comment on attachment 8895264 [details] [diff] [review]
bug_1386719_v1.patch

I don't object this windows-specific change, Honza's review is enough.
Attachment #8895264 - Flags: review?(kaie)
Build breakage

c:/Users/task_1503674852/nspr/Debug/pr/src/io/../../../../pr/src/io/prsocket.c(307): error C2039: 'overlappedActive': is not a member of 'PRFilePrivate'
c:\Users\task_1503674852\nspr\pr\include\private\primpl.h(1732): note: see declaration of 'PRFilePrivate'
c:/Users/task_1503674852/nspr/Debug/pr/src/io/../../../../pr/src/io/prsocket.c(309): warning C4022: 'GetOverlappedResult': pointer mismatch for actual parameter 1
c:/Users/task_1503674852/nspr/Debug/pr/src/io/../../../../pr/src/io/prsocket.c(309): error C2039: 'ol': is not a member of 'PRFilePrivate'
c:\Users\task_1503674852\nspr\pr\include\private\primpl.h(1732): note: see declaration of 'PRFilePrivate'
c:/Users/task_1503674852/nspr/Debug/pr/src/io/../../../../pr/src/io/prsocket.c(309): warning C4133: 'function': incompatible types - from 'PRInt32 *' to 'LPOVERLAPPED'
c:/Users/task_1503674852/nspr/Debug/pr/src/io/../../../../pr/src/io/prsocket.c(309): error C2198: 'GetOverlappedResult': too few arguments for call
c:/Users/task_1503674852/nspr/Debug/pr/src/io/../../../../pr/src/io/prsocket.c(315): error C2039: 'overlappedActive': is not a member of 'PRFilePrivate'
c:\Users\task_1503674852\nspr\pr\include\private\primpl.h(1732): note: see declaration of 'PRFilePrivate'
make[3]: *** [prsocket.obj] Error 2
make[3]: Leaving directory `/c/Users/task_1503674852/nspr/Debug/pr/src/io'
make[2]: *** [export] Error 2
make[2]: Leaving directory `/c/Users/task_1503674852/nspr/Debug/pr/src'
make[1]: *** [export] Error 2
make[1]: Leaving directory `/c/Users/task_1503674852/nspr/Debug/pr'
make: *** [export] Error 2
make: Leaving directory `/c/Users/task_1503674852/nspr/Debug'
Flags: needinfo?(dd.mozilla)
Forgot to add '#if defined(_WIN64)'
Attachment #8895264 - Attachment is obsolete: true
Flags: needinfo?(dd.mozilla)
Attachment #8901242 - Flags: review+
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.17
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: