Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jumperchen committed Apr 24, 2023
1 parent 166dbd3 commit 33918af
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2.0.3

**Bug fix:**
* [socket.io-client-dart#330](https://github.com/rikulo/socket.io-client-dart/issues/330) _Client throws error when buffer is received

## 2.0.2

**Bug fix:**
Expand Down
4 changes: 2 additions & 2 deletions lib/src/parser/binary.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ class Binary {
return data;
}

static Map reconstructPacket(Map packet, List<List<int>> buffers) {
static Map reconstructPacket(Map packet, List<dynamic> buffers) {
packet['data'] = _reconstructPacket(packet['data'], buffers);
packet['attachments'] = -1; // no longer useful
return packet;
}

static Object? _reconstructPacket(Object? data, List<List<int>> buffers) {
static Object? _reconstructPacket(Object? data, List<dynamic> buffers) {
if (data is List) {
final _data = data;
int i = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/parser/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ class BinaryReconstructor {
if (this.buffers.length == this.reconPack!['attachments']) {
// done with buffer list
var packet = Binary.reconstructPacket(
this.reconPack!, this.buffers.cast<List<int>>());
this.reconPack!, this.buffers);
this.finishedReconstruction();
return packet;
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: socket_io_common
description: Socket.io common parser library.
version: 2.0.2
version: 2.0.3
homepage: https://www.zkoss.org
repository: https://github.com/rikulo/socket_io_common
issue_tracker: https://github.com/rikulo/socket_io_common/issues
Expand Down

0 comments on commit 33918af

Please sign in to comment.