Skip to content

Commit 5c36a4f

Browse files
Merge pull request #130 from sendbird/v4.2.30
Add 4.2.30.
2 parents 8f09912 + 7432b39 commit 5c36a4f

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v4.2.30 (Dec 5, 2024)
2+
3+
### Improvements
4+
- Fixed the reconnection bug when moving to background and then moving to foreground quickly
5+
16
## v4.2.29 (Nov 20, 2024)
27

38
### Features

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Before installing Sendbird Chat SDK, you need to create a Sendbird application o
5050

5151
```yaml
5252
dependencies:
53-
sendbird_chat_sdk: ^4.2.29
53+
sendbird_chat_sdk: ^4.2.30
5454
```
5555
5656
- Run `flutter pub get` command in your project directory.

lib/src/internal/main/chat/chat.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ part 'chat_notifications.dart';
6262
part 'chat_push.dart';
6363
part 'chat_user.dart';
6464

65-
const sdkVersion = '4.2.29';
65+
const sdkVersion = '4.2.30';
6666

6767
// Internal implementation for main class. Do not directly access this class.
6868
class Chat with WidgetsBindingObserver {

lib/src/internal/main/chat_manager/connection_manager.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ class ConnectionManager {
260260
reconnectTimer = null;
261261
}
262262

263-
final isClosedSuccessfully = await webSocketClient.close();
263+
await webSocketClient.close();
264264

265265
final disconnectedUserId = chat.chatContext.currentUserId ?? '';
266266

@@ -292,7 +292,8 @@ class ConnectionManager {
292292
await chat.eventDispatcher.onDisconnected();
293293
}
294294

295-
if (fromEnterBackground && !chat.isBackground && !isClosedSuccessfully) {
295+
if (fromEnterBackground && !chat.isBackground && !isReconnecting()) {
296+
sbLog.i(StackTrace.current, 'reconnect()');
296297
chat.connectionManager.reconnect(reset: true); // Check
297298
} else {
298299
if (isReconnecting()) {

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: sendbird_chat_sdk
22
description: With Sendbird Chat for Flutter, you can easily build an in-app chat with all the essential messaging features.
3-
version: 4.2.29
3+
version: 4.2.30
44
homepage: https://sendbird.com
55
repository: https://github.com/sendbird/sendbird-chat-sdk-flutter
66
documentation: https://sendbird.com/docs/chat/sdk/v4/flutter/getting-started/send-first-message

0 commit comments

Comments
 (0)