Commit 6bf323c58519e4c34143005785f024ad95d8c703

Authored by Arthur Bikmullin
1 parent b3491783

Fixed incorrect mserver port bug

Showing 1 changed file with 5 additions and 3 deletions
... ... @@ -60,11 +60,13 @@ void MainWindow::createHttpServer(QString filename)
60 60
61 61 if (!httpServers.contains(f.absolutePath()))
62 62 {
63   - port = httpServers.empty() ? 8080 : port + 1;
  63 + port = httpServers.empty() ? 8080 : port + 10;
64 64 httpServer = new HttpServer(f.absolutePath(), port, this);
65 65
66   - while(!httpServer->listen(QHostAddress::LocalHost, port) && port < 8180)
67   - port++;
  66 + while(!httpServer->listen(QHostAddress::LocalHost, port) && port < 9080) {
  67 + port+=10;
  68 + httpServer->port = port;
  69 + }
68 70
69 71 if (httpServer->isListening())
70 72 {
... ...