Skip to content

EIdOpenSSLShutdownError durring Application Shutdown #11

@WeberAndre

Description

@WeberAndre

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions