mirror of
https://github.com/SantaSpeen/BeamMP-Server.git
synced 2026-02-16 11:20:39 +00:00
fix setsockopt SO_SNDTIMEO for windows, bump version number to 3.0.2, update commandline
This commit is contained in:
2
deps/commandline
vendored
2
deps/commandline
vendored
Submodule deps/commandline updated: 01434c11aa...b1da8bcb69
@@ -7,12 +7,12 @@ extern TSentry Sentry;
|
||||
#include <atomic>
|
||||
#include <cstring>
|
||||
#include <deque>
|
||||
#include <filesystem>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
#include <sstream>
|
||||
#include <zlib.h>
|
||||
#include <filesystem>
|
||||
|
||||
#include "Compat.h"
|
||||
|
||||
@@ -121,7 +121,7 @@ private:
|
||||
static inline std::mutex mShutdownHandlersMutex {};
|
||||
static inline std::deque<TShutdownHandler> mShutdownHandlers {};
|
||||
|
||||
static inline Version mVersion { 3, 0, 1 };
|
||||
static inline Version mVersion { 3, 0, 2 };
|
||||
};
|
||||
|
||||
std::string ThreadName(bool DebugModeOverride = false);
|
||||
|
||||
@@ -154,10 +154,10 @@ void TNetwork::TCPServerMain() {
|
||||
beammp_warn(("Got an invalid client socket on connect! Skipping..."));
|
||||
continue;
|
||||
}
|
||||
// set timeout
|
||||
size_t SendTimeoutMS = 30 * 1000;
|
||||
// set timeout (DWORD, aka uint32_t)
|
||||
uint32_t SendTimeoutMS = 30 * 1000;
|
||||
#if defined(BEAMMP_WINDOWS)
|
||||
int ret = ::setsockopt(client.Socket, SOL_SOCKET, SO_SNDTIMEO, reinterpret_cast<const char*>(&ms), sizeof(ms));
|
||||
int ret = ::setsockopt(client.Socket, SOL_SOCKET, SO_SNDTIMEO, reinterpret_cast<const char*>(&SendTimeoutMS), sizeof(SendTimeoutMS));
|
||||
#else // POSIX
|
||||
struct timeval optval;
|
||||
optval.tv_sec = (int)(SendTimeoutMS / 1000);
|
||||
|
||||
Reference in New Issue
Block a user