diff --git a/client/core/servercontroller.cpp b/client/core/servercontroller.cpp index e18b11b3..58f1fd3c 100644 --- a/client/core/servercontroller.cpp +++ b/client/core/servercontroller.cpp @@ -662,6 +662,14 @@ ErrorCode ServerController::isServerPortBusy(const ServerCredentials &credential } if (!stdOut.isEmpty()) { + if (transportProto == "tcp") { + const static QRegularExpression localPortRegExp(".*:(\\d+)->"); + QRegularExpressionMatch localPortMatch = localPortRegExp.match(stdOut); + if (localPortMatch.hasMatch() && localPortMatch.captured(1) != port) { + return ErrorCode::NoError; + } + } + return ErrorCode::ServerPortAlreadyAllocatedError; } return ErrorCode::NoError;