in the port busy check, for tcp only the local port is now checked

This commit is contained in:
vladimir.kuznetsov 2023-04-18 20:00:40 +03:00
parent 10bca290c3
commit fc603f11ce

View file

@ -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;