diff --git a/src/App.h b/src/App.h index 85b80fc..f61e3f5 100644 --- a/src/App.h +++ b/src/App.h @@ -280,12 +280,18 @@ public: /* Host, port, callback */ TemplatedApp &&listen(std::string host, int port, fu2::unique_function &&handler) { + if (!host.length()) { + return listen(port, std::move(handler)); + } handler(httpContext->listen(host.c_str(), port, 0)); return std::move(*this); } /* Host, port, options, callback */ TemplatedApp &&listen(std::string host, int port, int options, fu2::unique_function &&handler) { + if (!host.length()) { + return listen(port, options, std::move(handler)); + } handler(httpContext->listen(host.c_str(), port, options)); return std::move(*this); } diff --git a/uSockets b/uSockets index 5a4570e..8004157 160000 --- a/uSockets +++ b/uSockets @@ -1 +1 @@ -Subproject commit 5a4570eac1a699abe8b842972b1a807da8c40abe +Subproject commit 8004157c8d8076b1e48943a812b904cc49e02ac2