diff --git a/src/xenia/profiling.cc b/src/xenia/profiling.cc index 2267980cc..a143ff927 100644 --- a/src/xenia/profiling.cc +++ b/src/xenia/profiling.cc @@ -13,10 +13,14 @@ #define MICROPROFILEUI_ENABLED 1 #define MICROPROFILE_IMPL 1 #define MICROPROFILEUI_IMPL 1 +#define MICROPROFILE_PER_THREAD_BUFFER_SIZE (1024 * 1024 * 10) #define MICROPROFILE_USE_THREAD_NAME_CALLBACK 1 #define MICROPROFILE_PRINTF PLOGI -#define MICROPROFILE_WEBSERVER 0 +#define MICROPROFILE_WEBSERVER 1 #define MICROPROFILE_DEBUG 0 +#if MICROPROFILE_WEBSERVER +#include +#endif // MICROPROFILE_WEBSERVER #include #include diff --git a/third_party/microprofile/microprofile.h b/third_party/microprofile/microprofile.h index 01126528b..911593cdd 100644 --- a/third_party/microprofile/microprofile.h +++ b/third_party/microprofile/microprofile.h @@ -1985,7 +1985,11 @@ bool MicroProfileWebServerUpdate() bool bServed = false; if(!MP_INVALID_SOCKET(Connection)) { - std::lock_guard Lock(MicroProfileMutex()); + int timeout = 100; + setsockopt(Connection, SOL_SOCKET, SO_RCVTIMEO, + reinterpret_cast(&timeout), sizeof(timeout)); + + std::lock_guard Lock(MicroProfileMutex()); char Req[8192]; MicroProfileSetNonBlocking(Connection, 0); int nReceived = recv(Connection, Req, sizeof(Req)-1, 0);