Skip to content

Commit 68f8d51

Browse files
committed
Fix Bugs
- Fix bug when receiving file: passing a to-be-cleared buffer by referrence
1 parent 4504c19 commit 68f8d51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/tcpcontroller/controller.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* @Author : Linloir
33
* @Date : 2022-10-08 15:10:04
4-
* @LastEditTime : 2022-10-19 00:54:03
4+
* @LastEditTime : 2022-10-19 10:41:12
55
* @Description :
66
*/
77

@@ -184,7 +184,7 @@ class TCPController {
184184
else {
185185
//Part of payload
186186
//Transmit all to stream
187-
_payloadPullStreamController.add(buffer);
187+
_payloadPullStreamController.add([...buffer]);
188188
//Reduce payload bytes left
189189
payloadLength -= buffer.length;
190190
//Clear buffer

0 commit comments

Comments
 (0)