[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: possible issue with bsd_poll() on Windows
[Thread Prev] | [Thread Next]
- Subject: RE: possible issue with bsd_poll() on Windows
- From: John Dunn <John.Dunn@xxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Tue, 27 Nov 2018 17:45:41 +0000
- To: "libssh@xxxxxxxxxx" <libssh@xxxxxxxxxx>
- Cc: 'Andreas Schneider' <asn@xxxxxxxxxxxxxx>
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 Windows | Andreas Schneider <asn@xxxxxxxxxxxxxx> |
Re: possible issue with bsd_poll() on Windows | Andreas Schneider <asn@xxxxxxxxxxxxxx> |