mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2025-07-04 00:36:14 +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;
|
uint32_t RealSize;
|
||||||
int64_t BytesRcv = recv(TCPSock, &RealSize, sizeof(RealSize), 0);
|
int64_t BytesRcv = recv(TCPSock, &RealSize, sizeof(RealSize), 0);
|
||||||
if (BytesRcv != sizeof(RealSize)) {
|
if (BytesRcv != sizeof(RealSize)) {
|
||||||
error(Sec("invalid packet (1)"));
|
error(std::string(Sec("invalid packet: expected 4, got ")) + std::to_string(BytesRcv));
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
// RealSize is big-endian, so we convert it to host endianness
|
// RealSize is big-endian, so we convert it to host endianness
|
||||||
|
Loading…
x
Reference in New Issue
Block a user