EIdOpenSSLShutdownError on TCP server shutdown after verifying SSL_shutdown result code #513
Labels
Element: SSL/TLS
Issues related to SSL/TLS handling, TIdSSLIOHandlerSocketBase and descendants
Element: TCP
Issues related to TCP handling, TIdTCPClient and TIdTCPServer descendants, etc
Status: More Info Needed
Issue needs further information to continue progress
Type: Bug
Issue is a bug in existing code
With recent IdCustomTCPServer code is no longer disconnecting in TIdCustomTCPServer.DoTerminateContext(AContext: TIdContext), but instead closes socket with AContext.Binding.CloseSocket. This then causes SSL_shutdown in TIdOpenSSLSocket.Shutdown to return -1 that leads to EIdOpenSSLShutdownError. Original OpenSSL handler calls SSL_shutdown and gets -1 in the same way but doesn't check the result and no exception is raised. Does it really need to raise exception on server shutdown? As noted by RLebeau calling disconnect might cause AVs (and I was getting AV with AContext.Connection.Disconnect), but at least it was not raising exception on every shutdown.
The text was updated successfully, but these errors were encountered: