fix: connection rate limit

This commit is contained in:
2021-11-04 09:45:40 +01:00
parent 941ea15ec5
commit 54ec3b776a

View File

@@ -32,9 +32,11 @@ bool Connexion::updateSocket() {
if (m_Socket.GetStatus() != network::Socket::Connected) if (m_Socket.GetStatus() != network::Socket::Connected)
return false; return false;
DataBuffer buffer; while (true) {
m_Socket.Receive(buffer, sizeof(std::uint64_t)); DataBuffer buffer;
if (buffer.GetSize() > 0) { m_Socket.Receive(buffer, sizeof(std::uint64_t));
if (buffer.GetSize() == 0)
break;
std::uint64_t packetLenght; std::uint64_t packetLenght;
buffer >> packetLenght; buffer >> packetLenght;