Closed Bug 120181 Opened 23 years ago Closed 23 years ago

No error message on failure to connect

Categories

(Core :: Networking, defect)

x86
OS/2
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 106188

People

(Reporter: jhpedemonte, Assigned: neeti)

References

()

Details

Attachments

(1 file)

This is an extension of the discussion in bug 100776.  To summarize, 
OS/2 uses the BSD sockets model, which does not set the exception bit 
on failure to connect over a nonblocking socket.  Rather, it will set 
the socket as both readable and writeable, at which point we need to 
call getsockopt() with the SO_ERROR option to find if the connection 
succeeded.

According to the documention in NSPR 
(http://lxr.mozilla.org/seamonkey/source/nsprpub/pr/include/prio.h#125
7), after calling PR_Poll, we should be calling PR_GetConnectStatus() 
to see if the connection succeeded.  This is not currently being done 
in the browser.

Bug 100776 explored this bug from the side of NSPR.  We concluded, 
however, that the actual bug was in the browser side.
Attached patch patchSplinter Review
This patch implements a solution.  Here, I am calling PR_GetConnectStatus in
the nsSocketTransportService::Run() loop.  The NSPR documentation says to use
PR_ConnectContinue() rather the PR_GetConnectStatus(), but the former just
sends me to _PR_InvalidStatus().  Don't know why.
Marking as dup.  The code posted by wtc in bug 106188 fixes the 
localhost issue on OS/2.  Plus, it is a much nicer solution than the 
one presented here!

*** This bug has been marked as a duplicate of 106188 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
verified
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: