Skip to content

Commit d471383

Browse files
committed
Fixed not encoding ACKs
1 parent d5b7730 commit d471383

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/protocol/AcknowledgePacket.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ abstract class AcknowledgePacket extends Packet{
3434
public array $packets = [];
3535

3636
protected function encodePayload(ByteBufferWriter $out) : void{
37-
$payload = "";
3837
$subWriter = new ByteBufferWriter();
3938
sort($this->packets, SORT_NUMERIC);
4039
$count = count($this->packets);
@@ -77,7 +76,7 @@ protected function encodePayload(ByteBufferWriter $out) : void{
7776
}
7877

7978
BE::writeUnsignedShort($out, $records);
80-
$out->writeByteArray($payload);
79+
$out->writeByteArray($subWriter->getData());
8180
}
8281

8382
protected function decodePayload(ByteBufferReader $in) : void{

0 commit comments

Comments
 (0)