ConnectionStatusChangeReason Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Connection status change reason supported by DeviceClient
public enum ConnectionStatusChangeReason
type ConnectionStatusChangeReason =
Public Enum ConnectionStatusChangeReason
- Inheritance
-
System.EnumConnectionStatusChangeReason
Fields
Name | Value | Description |
---|---|---|
Connection_Ok | 0 | The client is connected, and ready to be used. This is returned with a connection status of Connected. |
Expired_SAS_Token | 1 | The SAS token associated with the client has expired, and cannot be renewed. The supplied credentials need to be fixed before a connection can be established. NOTE: This is currently not used in the client library. |
Device_Disabled | 2 | The device/ module has been deleted or marked as disabled (on your IoT Hub instance). Fix the device/ module status in Azure before attempting to create the associated client instance. This is returned with a connection status of Disconnected |
Bad_Credential | 3 | Incorrect credentials were supplied to the client instance. The supplied credentials need to be fixed before a connection can be established. This is returned with a connection status of Disconnected |
Retry_Expired | 4 | The client was disconnected due to a transient exception, but the retry policy expired before a connection could be re-established. If you want to perform more operations on the device client, you should Dispose() and then re-initialize the client. This is returned with a connection status of Disconnected |
No_Network | 5 | The client was disconnected due to loss of network. NOTE: This is currently not used in the client library. |
Communication_Error | 6 | This can be returned with either a connection status of Disconnected_Retrying or Disconnected. When returned with a connection status of Disconnected_Retrying, this signifies that the client is trying to recover from a disconnect due to a transient exception. Do NOT close or open the client instance. Once the client successfully reports Connected, you can resume operations on the client. When returned with a connection status of Disconnected signifies that client is disconnected due to a non-retryable exception. If you want to perform more operations on the device client, you should Dispose() and then re-initialize the client. |
Client_Close | 7 | The client has been closed gracefully. If you want to perform more operations on the device client, you should Dispose() and then re-initialize the client. This is returned with a connection status of Disabled |