|
|
@ -51,6 +51,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
#include "PassiveSocket.h"
|
|
|
|
#include "PassiveSocket.h"
|
|
|
|
#include "PluginManager.h"
|
|
|
|
#include "PluginManager.h"
|
|
|
|
#include "MiscUtils.h"
|
|
|
|
#include "MiscUtils.h"
|
|
|
|
|
|
|
|
#include "Debug.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include <cstdio>
|
|
|
|
#include <cstdio>
|
|
|
|
#include <cstdlib>
|
|
|
|
#include <cstdlib>
|
|
|
@ -85,6 +86,7 @@ namespace {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
namespace DFHack {
|
|
|
|
namespace DFHack {
|
|
|
|
|
|
|
|
DBG_DECLARE(core, socket, DebugCategory::LINFO);
|
|
|
|
|
|
|
|
|
|
|
|
struct BlockGuard {
|
|
|
|
struct BlockGuard {
|
|
|
|
std::lock_guard<std::mutex> lock;
|
|
|
|
std::lock_guard<std::mutex> lock;
|
|
|
@ -484,6 +486,10 @@ void ServerMainImpl::threadFn(std::promise<bool> promise, int port)
|
|
|
|
ServerConnection::Accepted(client);
|
|
|
|
ServerConnection::Accepted(client);
|
|
|
|
client = nullptr;
|
|
|
|
client = nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
WARN(socket).print("Accepting connection error: %s\n", server.socket.DescribeError());
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch(BlockedException &) {
|
|
|
|
} catch(BlockedException &) {
|
|
|
|
if (client)
|
|
|
|
if (client)
|
|
|
|