diff --git a/rbkit-lib/subscriber.cpp b/rbkit-lib/subscriber.cpp index 571b07d..faaea89 100644 --- a/rbkit-lib/subscriber.cpp +++ b/rbkit-lib/subscriber.cpp @@ -246,8 +246,11 @@ void Subscriber::performHandshake() { commandSocket->start(commandUrl); switch (commandSocket->performHandShake()) { - case RBKit::HandShakeResponse::VERSION_MISMATCH: - emitConnectionError(QString("RBkit is unable to connect to Server because either Server or Desktop version is too old")); + case RBKit::HandShakeResponse::VERSION_MISMATCH_SERVER_OLD: + emitConnectionError(QString("RBkit is unable to connect to Server because Server version is too old")); + break; + case RBKit::HandShakeResponse::VERSION_MISMATCH_CLIENT_OLD: + emitConnectionError(QString("RBkit is unable to connect to Server because this client version is too old")); break; case RBKit::HandShakeResponse::VERSION_MATCH: handShakeCompleted(); diff --git a/rbkit-lib/zmqsockets.cpp b/rbkit-lib/zmqsockets.cpp index 92f41c8..b56c5c6 100644 --- a/rbkit-lib/zmqsockets.cpp +++ b/rbkit-lib/zmqsockets.cpp @@ -13,7 +13,14 @@ static const int timerIntervalInMs = 1000; RBKit::HandShakeResponse verifyHandShakeResponse(RBKit::EvtHandshake* handShake) { if (handShake->rbkitProtocolVersion != RBKit::AppState::getInstance()->getProtocolVersion()) { - return RBKit::HandShakeResponse::VERSION_MISMATCH; + if (handShake->rbkitProtocolVersion.toFloat() < RBKit::AppState::getInstance()->getProtocolVersion().toFloat()) + { + return RBKit::HandShakeResponse::VERSION_MISMATCH_SERVER_OLD; + } + else + { + return RBKit::HandShakeResponse::VERSION_MISMATCH_CLIENT_OLD; + } } RBKit::AppState::getInstance()->setAppState("process_name", handShake->processName); diff --git a/rbkit-lib/zmqsockets.h b/rbkit-lib/zmqsockets.h index d31425b..10244dd 100644 --- a/rbkit-lib/zmqsockets.h +++ b/rbkit-lib/zmqsockets.h @@ -18,7 +18,8 @@ namespace RBKit class CommandBase; enum HandShakeResponse { NO_RESPONSE, - VERSION_MISMATCH, + VERSION_MISMATCH_SERVER_OLD, + VERSION_MISMATCH_CLIENT_OLD, VERSION_MATCH };