diff --git a/lib_fiber/samples-gui/QtFiber/mainwindow.cpp b/lib_fiber/samples-gui/QtFiber/mainwindow.cpp index 5c42467da..cae7eb336 100644 --- a/lib_fiber/samples-gui/QtFiber/mainwindow.cpp +++ b/lib_fiber/samples-gui/QtFiber/mainwindow.cpp @@ -107,6 +107,7 @@ void MainWindow::onStartServer() ui_->stopServer->setEnabled(true); ui_->startClient->setEnabled(true); + ui_->startServer->setEnabled(false); server_ = new fiber_server("127.0.0.1", 9001, this); qDebug() << "Start fiber server"; @@ -120,6 +121,7 @@ void MainWindow::onStopServer() server_->stop(); delete server_; server_ = nullptr; + ui_->startServer->setEnabled(true); ui_->stopServer->setEnabled(false); ui_->startClient->setEnabled(false); }