Package version: Microsoft.Azure.Devices.Client 1.17.0
I have created a device client in the following way
deviceClient = DeviceClient.Create(s_iotHubUri, new DeviceAuthenticationWithToken(deviceId, sasToken), Microsoft.Azure.Devices.Client.TransportType.Amqp);
I use the deviceClient
to send messages using deviceClient.SendEventAsync(message)
. The SAS expiry is set to be 5 mins (for example) but the SAS is not expiring at all and the messages are being sent using the device client. I expect an exception like:
SAS has expired
But messages are being sent normally. But if I stop the connection and try to create a client using the same SAS, I get SAS expired exception but why does this not happen while sending messages to device?
Please help with this issue.