SecureBlackbox 16: The Active property of the socket-based component is true, though I know that the connection has been closed by the server. Why so?
Note: This article applies only to SecureBlackbox Legacy. For future development please consider using the latest version.
The Active property, when set, indicates that the connection was successful and the component was ready. However if the connection is lost at the socket level, the Active property can still be True. This is because at the socket level there's no way to be notified that the connection is closed. The only way to check the actual connection state is to attempt to send something and get an error in case the connection has been closed. This is part of the design of TCP/IP.
Your code should always be ready to handle unexpected disconnections and other network errors and reconnect if needed.
We appreciate your feedback. If you have any questions, comments, or suggestions about this article please contact our support team at firstname.lastname@example.org.