lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #31590] getsockopt(... SO_ERROR ...) gives EINPROGRESS


From: Ken MacKay
Subject: [lwip-devel] [bug #31590] getsockopt(... SO_ERROR ...) gives EINPROGRESS after a successful nonblocking connection.
Date: Tue, 09 Nov 2010 00:10:12 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5

URL:
  <http://savannah.nongnu.org/bugs/?31590>

                 Summary: getsockopt(... SO_ERROR ...) gives EINPROGRESS
after a successful nonblocking connection.
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: kmackay
            Submitted on: Tue 09 Nov 2010 12:10:10 AM GMT
                Category: TCP
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: CVS Head

    _______________________________________________________

Details:

If I create a new TCP socket and set it to be nonblocking, then call
connect(), it returns -1 with errno set to EINPROGRESS as expected. I then
call select() with the socket in the write set to determine when the
connection has succeeded. This also works as expected. Now I need to determine
if the socket is actually connected, or errored out. I use getsockopt(socket,
SOL_SOCKET, SO_ERROR, ...) to get the socket error code if any.

On other platforms (Windows, OSX, Linux), if the connection has been
successful then the socket error code is 0. However, when using lwIP, the
socket error code is EINPROGRESS even after a successful connection has been
made.




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?31590>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]