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

RE: possible issue with bsd_poll() on Windows

On Friday, November 23, 2018 12:54 PM Andreas Schneider said:
> Can you take a look at:
> https://git.libssh.org/users/asn/libssh.git/log/?h=master-poll

This code doesn't work - in the case where either the connection is refused ( WSAECONNREFUSED ) or times out ( WSAETIMEDOUT ) it continuously loops trying to connect since bsd_socket_disconnected doesn't handle those two cases. Adding them to the switch statement is straightforward and does cause the connection to fail but I still have concerns about this approach 

(1) it still doesn't get good error messages on Windows. I get "Failed to poll context: The operation completed successfully" which doesn't inform the user what's actually going on

(2) there may be other WSA errors that could possibly happen that are also missing from the switch statement. I'm definitely not a Winsock expert so I'm don't know what those might be.

Re: possible issue with bsd_poll() on WindowsAndreas Schneider <asn@xxxxxxxxxxxxxx>
Re: possible issue with bsd_poll() on WindowsAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org