Disconnecting the broker leads to an error

Thank you for reply.
The size is - #define MQTT_COMMAND_CONTEXTS_POOL_SIZE ( 10U )
I used the MQTTagent example code as a basis. As I understand it, there is a problem with determining the state. As I wroteFORUM POST earlier, the MQTT_CheckConnectStatus(pMQTTContext ) function does not work correctly if the link to the Internet remains, but it is the broker’s server that is disconnected. The problem does not occur if you physically pull out the ethernet cable, then the cycle stops