rbkit-client icon indicating copy to clipboard operation
rbkit-client copied to clipboard

Fix protocol version check to use minor version also

Open emilsoman opened this issue 10 years ago • 0 comments

Protocol versions have a major and minor version. Major versions are bumped when the protocol format has breaking changes. Minor versions are bumped when protocol has additions, like new messages or new commands, but existing clients need not worry about breaking changes. A client running on protocol version 2.0 should still work fine with a server with protocol version 2.1.

But currently the client does only a simple equality comparison of the whole protocol version, ie, it checks if "2.0" == "2.1" and fails. We should change it to the following:

Do not fail if :

  1. Major protocol version numbers of both are same
  2. Minor protocol version of server >= minor protocol version of client

emilsoman avatar Jul 17 '15 12:07 emilsoman