File tree Expand file tree Collapse file tree 3 files changed +20
-2
lines changed
src/commonMain/kotlin/com/ably/chat Expand file tree Collapse file tree 3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ public final class com/ably/chat/ConnectionKt {
5353}
5454
5555public final class com/ably/chat/ConnectionStatus : java/lang/Enum {
56+ public static final field Closed Lcom/ably/chat/ConnectionStatus;
57+ public static final field Closing Lcom/ably/chat/ConnectionStatus;
5658 public static final field Connected Lcom/ably/chat/ConnectionStatus;
5759 public static final field Connecting Lcom/ably/chat/ConnectionStatus;
5860 public static final field Disconnected Lcom/ably/chat/ConnectionStatus;
Original file line number Diff line number Diff line change @@ -53,6 +53,8 @@ public final class com/ably/chat/ConnectionKt {
5353}
5454
5555public final class com/ably/chat/ConnectionStatus : java/lang/Enum {
56+ public static final field Closed Lcom/ably/chat/ConnectionStatus;
57+ public static final field Closing Lcom/ably/chat/ConnectionStatus;
5658 public static final field Connected Lcom/ably/chat/ConnectionStatus;
5759 public static final field Connecting Lcom/ably/chat/ConnectionStatus;
5860 public static final field Disconnected Lcom/ably/chat/ConnectionStatus;
Original file line number Diff line number Diff line change @@ -43,6 +43,20 @@ public enum class ConnectionStatus(public val stateName: String) {
4343 * (CHA-CS1f) The library is currently disconnected from Ably and will not attempt to reconnect.
4444 */
4545 Failed (" failed" ),
46+
47+ /* *
48+ * (CHA-CS1g) An explicit request by the developer to close the connection has been sent
49+ * to the Ably service. If a reply is not received from Ably within a short period of
50+ * time, the connection is forcibly terminated and the connection status becomes Closed.
51+ */
52+ Closing (" closing" ),
53+
54+ /* *
55+ * (CHA-CS1h) The connection has been explicitly closed by the client. In the closed state,
56+ * no reconnection attempts are made automatically. No connection state is preserved by
57+ * the service or the library.
58+ */
59+ Closed (" closed" ),
4660}
4761
4862/* *
@@ -187,7 +201,7 @@ private fun mapPubSubStatusToChat(status: ConnectionState): ConnectionStatus {
187201 ConnectionState .disconnected -> ConnectionStatus .Disconnected
188202 ConnectionState .suspended -> ConnectionStatus .Suspended
189203 ConnectionState .failed -> ConnectionStatus .Failed
190- ConnectionState .closing -> ConnectionStatus .Failed
191- ConnectionState .closed -> ConnectionStatus .Failed
204+ ConnectionState .closing -> ConnectionStatus .Closing
205+ ConnectionState .closed -> ConnectionStatus .Closed
192206 }
193207}
You can’t perform that action at this time.
0 commit comments