[Libwebsockets] [libwebsockets] With new nonblocking socket setting on iOS socket fails on EISCONN (#17)

"Andy Green (林安廸)" andy at warmcat.com
Thu Oct 24 16:05:55 CEST 2013

On 24/10/13 21:10, the mail apparently from shyswork included:
> With new nonblocking socket setting on iOS websocket is closed with
> EISCONN 56. It appears that in client-handshake.c in line 87
> (https://github.com/warmcat/libwebsockets/blob/master/lib/client-handshake.c#L87)
> only EALREADY and EINPROGRESS are checked. In my situation I get there
> first time with EINPROGRESS which is ok but the next time I get EISCONN
> which leads to fail. I have put simple check for EISCONN as quick and
> dirty fix but I haven't tested it thoroughly.

Sorry can you help me understand why we see EISCONN?

I don't mind adding it since it's seen in the wild (I don't think it 
ever comes on Linux so no harm) but I do not understand what it's 
telling me.

It's telling me that socket already made a good connection and I am 
coming and calling connect() on it again which it rejects?  Then I need 
to treat it as success, since we never ask it to connect to something 

Or it's telling me the connection is incomplete, in which case it needs 
treating like EINPROGRESS?


>> Reply to this email directly or view it on GitHub
> <https://github.com/warmcat/libwebsockets/issues/17>.

More information about the Libwebsockets mailing list