Skip to content

Commit fbfd3e8

Browse files
Merge pull request #143 from sendbird/v4.5.1
Add 4.5.1.
2 parents 5e0e7e7 + a42a7e9 commit fbfd3e8

File tree

5 files changed

+12
-8
lines changed

5 files changed

+12
-8
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
## v4.5.0 (Jul 23, 2025)
1+
## v4.5.1 (Jul 24, 2025)
2+
3+
### Improvements
4+
- Fixed a bug related to API timeout
5+
6+
## v4.5.0 (Jul 23, 2025) (Retracted)
27

38
### Features
49
- Added `getTotalUnreadMessageCountWithParams({GroupChannelTotalUnreadMessageCountParams? groupChannelParams, FeedChannelTotalUnreadMessageCountParams? feedChannelParams})` and deprecated `getTotalUnreadMessageCountWithFeedChannel([GroupChannelTotalUnreadMessageCountParams? params])`

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.5.0
53+
sendbird_chat_sdk: ^4.5.1
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
@@ -66,7 +66,7 @@ part 'chat_notifications.dart';
6666
part 'chat_push.dart';
6767
part 'chat_user.dart';
6868

69-
const sdkVersion = '4.5.0';
69+
const sdkVersion = '4.5.1';
7070

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

lib/src/internal/network/http/http_client/http_client.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class HttpClient {
3434
final SessionManager _sessionManager;
3535
final StatManager? _statManager;
3636

37+
final _client = http.Client(); // Check if it should be closed
38+
3739
HttpClient({
3840
required ChatContext chatContext,
3941
required SessionManager sessionManager,
@@ -65,17 +67,14 @@ class HttpClient {
6567
Future<http.StreamedResponse> _sendWithTimeout(
6668
http.BaseRequest request,
6769
) async {
68-
final client = http.Client();
6970
try {
7071
http.StreamedResponse response =
71-
await client.send(request).timeout(Duration(seconds: apiTimeoutSec));
72+
await _client.send(request).timeout(Duration(seconds: apiTimeoutSec));
7273
return response;
7374
} on TimeoutException {
7475
sbLog.e(StackTrace.current,
7576
'[TimeoutException] apiTimeoutSec: $apiTimeoutSec');
7677
rethrow;
77-
} finally {
78-
client.close();
7978
}
8079
}
8180

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.5.0
3+
version: 4.5.1
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)