mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
Revert "Server can be started on a random free port"
This change failed to build under the following platforms due to an older version of libmicrohttpd missing support for the MHD_DAEMON_INFO_BIND_PORT query: - Linux (native_dyn) - Linux (win32_dyn)
This commit is contained in:
@ -50,8 +50,6 @@ ZimFileServer::ZimFileServer(int serverPort, std::string zimpath)
|
||||
|
||||
if ( !server->start() )
|
||||
throw std::runtime_error("ZimFileServer failed to start");
|
||||
if ( serverPort == 0 )
|
||||
serverPort = server->getPort();
|
||||
|
||||
client.reset(new httplib::Client(address, serverPort));
|
||||
}
|
||||
@ -66,7 +64,7 @@ class ServerTest : public ::testing::Test
|
||||
protected:
|
||||
std::unique_ptr<ZimFileServer> zfs1_;
|
||||
|
||||
const int PORT = 0;
|
||||
const int PORT = 8001;
|
||||
const std::string ZIMFILE = "./test/zimfile.zim";
|
||||
|
||||
protected:
|
||||
|
Reference in New Issue
Block a user