mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-03 08:15:35 +00:00
more verbose errors
This commit is contained in:
parent
f0c87341ab
commit
6a3b933df1
@ -34,7 +34,7 @@ std::string Rcv(SOCKET TCPSock){
|
||||
uint32_t RealSize;
|
||||
int64_t BytesRcv = recv(TCPSock, &RealSize, sizeof(RealSize), 0);
|
||||
if (BytesRcv != sizeof(RealSize)) {
|
||||
error(Sec("invalid packet (1)"));
|
||||
error(std::string(Sec("invalid packet: expected 4, got ")) + std::to_string(BytesRcv));
|
||||
return "";
|
||||
}
|
||||
// RealSize is big-endian, so we convert it to host endianness
|
||||
|
Loading…
x
Reference in New Issue
Block a user