Md Lazreg wrote:

> I am not saying that that is how it should behave. I am saying that
> this is how it is behaving. With the above code and when my server
> is down, my Windows client will output "Socket in the error set" only.
> Which means that the socket was put in the ErrorSet and was not put in
> the WriteSet.

> Under the same conditions and using the same code, the UNIX client will
> put the socket in the WriteSet.

They are not the same conditions at the client. The Windows client has not
given up trying to connect to the server while the UNIX client has.

> Of course I do not know why Windows behaves this way, do you know?

The Windows client considers a rejected connection to be a soft error. UNIX
considers it to be a hard error. Windows clients continue to attempt the
connection in case the server is overloaded or restarting. UNIX clients give
up.

Windows behaves this way because Windows servers behave differently. A UNIX
server will typically ignore a SYN if it overloaded. A Windows server will
reply with a RST.

The correct response to a soft error is usually either to ignore it (since
it doesn't really give you useful information) or to attempt a different
connection while continuing to attempt the original one. Look at it this
way -- if the first connection attempt has made no progress in, say, ten
seconds, you probably want to start a second attempt (if you can) regardless
of whether the first attempt has encountered soft errors.

It makes no sense, usually, to abort a connection attempt before it has hard
failed. But it also usually makes no sense to wait for a hard failure if you
have another type of connection you can try that's equally-good.

DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to