diff --git a/src/framework/net/outputmessage.h b/src/framework/net/outputmessage.h index 1da91d39..0a21fb22 100644 --- a/src/framework/net/outputmessage.h +++ b/src/framework/net/outputmessage.h @@ -31,7 +31,7 @@ class OutputMessage : public LuaObject { public: enum { - BUFFER_MAXSIZE = 1024, + BUFFER_MAXSIZE = 65536, MAX_STRING_LENGTH = 65536, MAX_HEADER_SIZE = 8 }; diff --git a/src/framework/net/server.cpp b/src/framework/net/server.cpp index d1055f1a..1d77c089 100644 --- a/src/framework/net/server.cpp +++ b/src/framework/net/server.cpp @@ -32,7 +32,14 @@ Server::Server(int port) ServerPtr Server::create(int port) { - return ServerPtr(new Server(port)); + try { + Server *server = new Server(port); + return ServerPtr(server); + } + catch(const std::exception& e) { + g_logger.error(stdext::format("Failed to initialize server: %s", e.what())); + return ServerPtr(); + } } void Server::close()