Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EIdOpenSSLShutdownError durring Application Shutdown #11

Open
WeberAndre opened this issue May 12, 2023 · 0 comments
Open

EIdOpenSSLShutdownError durring Application Shutdown #11

WeberAndre opened this issue May 12, 2023 · 0 comments

Comments

@WeberAndre
Copy link

I'am useing your new OpenSSL IOHandler with a TidHTTP instance.
The TIdHTTP Object ist created inside unit initialization including IOHandler and destroyed in finalization.
After the use of TidHTTP and wait some time I get an EIdOpenSSLShutdownError durring appliction shutdown / finalization.
So I think it has todo with keep alive handling? and the connection ist silently dropped by the server - but if the code don't use the TidHTTP component again until shutdown it crashes?

After debugging I found the following callstack:

TIdCustomHTTP.Destroy()
-> TIdTCPConnection.Destroy()
-> LIOHandler.Close()
-> TIdOpenSSLIOHandlerClientBase.Close()
-> TIdOpenSSLSocket.Close()
SSL_shutdown() --> -1
SSL_get_error() --> 5
-> raise EIdOpenSSLShutdownError.Create(...)

my current workaround is to call IoHandler.DiscardAll(); before destruction - that solves the problem, but is this the right way?

Any ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant