As far as I can tell, here is how the "serve protocol" and "worker protocol" both do it:
- Each side send the higher version they support to the other side.
- The other side tries to use that version if it supports it.
But that means if the two versions are not the same, the two ends of the connection will be using different versions! Madness!
I think we forgot one simple step:
- Take the minimum of the version you sent and version you received.
Then both sides will end up with the same version. Problem solved!
As far as I can tell, here is how the "serve protocol" and "worker protocol" both do it:
But that means if the two versions are not the same, the two ends of the connection will be using different versions! Madness!
I think we forgot one simple step:
Then both sides will end up with the same version. Problem solved!