mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-09-08 11:31:32 -04:00
make writePacketToSocket() clear data automatically
This commit is contained in:
parent
ae7d3379e4
commit
09782745c6
@ -53,8 +53,6 @@ void McClient::sendRequest() {
|
||||
writeVarInt(data, 0x01); // next state
|
||||
writePacketToSocket(data); // send handshake packet
|
||||
|
||||
data.clear();
|
||||
|
||||
writeVarInt(data, 0x00); // packet ID
|
||||
writePacketToSocket(data); // send status packet
|
||||
}
|
||||
@ -162,4 +160,6 @@ void McClient::writePacketToSocket(QByteArray &data) {
|
||||
// write it to the socket
|
||||
socket.write(dataWithSize);
|
||||
socket.flush();
|
||||
|
||||
data.clear();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user