IndySockets / Indy

Indy - Internet Direct
https://www.indyproject.org
434 stars 147 forks source link

When SSL_get_error() returns SSL_ERROR_SYSCALL, include the error from GetLastError() #514

Open rlebeau opened 6 months ago

rlebeau commented 6 months ago

BTW, when SSL_get_error returns 5 (SSL_ERROR_SYSCALL), It would be wise to include actual message from SysErrorMessage(GetLastError) that was in this case returning 'An operation was attempted on something that is not a socket". Raising 'Failed to shutdown the TLS connection.', doesn't give much clues what happened.

Originally posted by @rapa4362 in https://github.com/IndySockets/Indy/issues/513#issuecomment-1855887079