Google Cloud IoT Core - JWT Refresh

#1
  1. My goal is:

Refresh JWT with Mongoose OS before timeout without disconnecting to IoT Core.

  1. My actions are:

Using MOS GCP Lib to connect to IoT Core.

  1. The result I see is:

MOS console:
mgos_gcp.c:86 Dropping MQTT connection due to imminent token expiration

On IoT Core I get this error with every timeout:
image

IoT Core logs:

 jsonPayload: {
  disconnectType: "SERVER"   
  eventType: "DISCONNECT"   
  protocol: "MQTT"   
  resourceName: "projects/..."   
  serviceName: "cloudiot.googleapis.com"   
  status: {
   code: 9    
   description: "FAILED_PRECONDITION"    
   message: "The connection broke or was closed by the client."    
  }
 }
  1. My expectation & question is:

The device should stay connected to IoT Core. The disconnection results in a loss of data if, for example, data is to be sent via commands. Is it possible to refresh the token without a disconnect?