diff options
Diffstat (limited to 'tests/manual')
-rw-r--r-- | tests/manual/httpserver/main.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/manual/httpserver/main.cpp b/tests/manual/httpserver/main.cpp index ea729547ce..4ad44508b0 100644 --- a/tests/manual/httpserver/main.cpp +++ b/tests/manual/httpserver/main.cpp @@ -112,7 +112,11 @@ int main(int argc, char *argv[]) << "\":\n\n" << QDir(directory).entryList(QDir::Files).join(QLatin1Char('\n')) << "\n\non http://localhost:" << port << '\n'; - TestHTTPServer server(port); + TestHTTPServer server; + if (!server.listen(port)) { + std::wcout << "Couldn't listen on port " << port << server.errorString().toLocal8Bit(); + exit(-1); + } server.serveDirectory(directory); return a.exec(); |