diff --git a/asyncmy/replication/packets.py b/asyncmy/replication/packets.py index f39eee1..24d2fda 100644 --- a/asyncmy/replication/packets.py +++ b/asyncmy/replication/packets.py @@ -251,7 +251,7 @@ def read_variable_length_string(self): length = 0 bits_read = 0 while byte & 0x80 != 0: - byte = struct.pack("!B", self.read(1)) + byte = struct.unpack("!B", self.read(1))[0] length = length | ((byte & 0x7F) << bits_read) bits_read = bits_read + 7 return self.read(length)