mirror of
https://github.com/BeamMP/BeamMP-Server.git
synced 2026-02-16 10:41:01 +00:00
possibly fixed UDPSend error on unix
This commit is contained in:
@@ -58,10 +58,14 @@ void UDPSend(Client* c, std::string Data) {
|
||||
c->SetStatus(-1);
|
||||
}
|
||||
#else // unix
|
||||
if (sendOk != 0) {
|
||||
if (sendOk == -1) {
|
||||
debug(Sec("(UDP) Send Failed Code : ") + std::string(strerror(errno)));
|
||||
if (c->GetStatus() > -1)
|
||||
c->SetStatus(-1);
|
||||
} else if (sendOk == 0) {
|
||||
debug(Sec("(UDP) sendto returned 0"));
|
||||
if (c->GetStatus() > -1)
|
||||
c->SetStatus(-1);
|
||||
}
|
||||
#endif // WIN32
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user