From 0b96089a0a2653734a25d816076e4d9f2537314a Mon Sep 17 00:00:00 2001 From: antao Date: Sat, 27 Apr 2019 12:17:46 +0800 Subject: [PATCH] Update the submodule trantor --- lib/src/HttpServer.cc | 5 ++++- trantor | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/src/HttpServer.cc b/lib/src/HttpServer.cc index 094a0160..a5c0034a 100755 --- a/lib/src/HttpServer.cc +++ b/lib/src/HttpServer.cc @@ -66,7 +66,11 @@ static void defaultConnectionCallback(const trantor::TcpConnectionPtr &conn) HttpServer::HttpServer(EventLoop *loop, const InetAddress &listenAddr, const std::string &name) +#ifdef __linux__ : _server(loop, listenAddr, name.c_str()), +#else + : _server(loop, listenAddr, name.c_str(), true, false), +#endif _httpAsyncCallback(defaultHttpAsyncCallback), _newWebsocketCallback(defaultWebSockAsyncCallback), _connectionCallback(defaultConnectionCallback) @@ -155,7 +159,6 @@ void HttpServer::onMessage(const TcpConnectionPtr &conn, if (resp->statusCode() == k101SwitchingProtocols) { requestParser->setWebsockConnection(wsConn); - } auto httpString = std::dynamic_pointer_cast(resp)->renderToString(); conn->send(httpString); diff --git a/trantor b/trantor index 4680663d..26c2df7b 160000 --- a/trantor +++ b/trantor @@ -1 +1 @@ -Subproject commit 4680663d3529d3cba41d688d15661306dd23c0d9 +Subproject commit 26c2df7b005901dd9a2255374d67a81414a9c893