This commit is contained in:
Anonymous-275 2021-03-31 01:57:11 +03:00
parent e7ae71513c
commit 808ab94c68
2 changed files with 7 additions and 3 deletions

View File

@ -42,7 +42,7 @@ public:
// Causes all threads to finish up and exit gracefull gracefully
static void GracefullyShutdown();
static TConsole& Console() { return *mConsole; }
static std::string ServerVersion() { return "2.0"; }
static std::string ServerVersion() { return "2.0.1"; }
static std::string ClientVersion() { return "2.0"; }
static std::string PPS() { return mPPS; }
static void SetPPS(std::string NewPPS) { mPPS = NewPPS; }

View File

@ -373,7 +373,11 @@ bool TNetwork::TCPSend(TClient& c, const std::string& Data, bool IsSync) {
Sent = 0;
Size += 4;
do {
#ifdef WIN32
int32_t Temp = send(c.GetTCPSock(), &Send[Sent], Size - Sent, 0);
#else //WIN32
int32_t Temp = send(c.GetTCPSock(), &Send[Sent], Size - Sent, MSG_NOSIGNAL);
#endif //WIN32
if (Temp == 0) {
debug("send() == 0: " + std::string(std::strerror(errno)));
if (c.GetStatus() > -1)
@ -492,7 +496,7 @@ void TNetwork::Looper(const std::weak_ptr<TClient>& c){
break;
}
if (!Client->IsSyncing() && Client->IsSynced() && Client->MissedPacketQueueSize() != 0) {
debug("sending " + std::to_string(Client->MissedPacketQueueSize()) + " queued packets");
//debug("sending " + std::to_string(Client->MissedPacketQueueSize()) + " queued packets");
while (Client->MissedPacketQueueSize() > 0) {
std::string QData {};
{ // locked context