Closed wight-airmash closed 4 years ago
Agreed, I'd wrapped the decoder in a try-catch to mitigate this, but this condition should be dealt with directly too - I've applied your fix in https://github.com/airmash-refugees/airmash-frontend/commit/f5b7bd909957967130f6a617cdc1b66ad28a8447.
During the protocol update process, there may be cases when the frontend with the extended schemas has already been deployed but some of the servers have not yet been updated. Because of this, the frontend parser may go beyond the boundaries of the smaller than expected binary packet.
To avoid waiting for all servers to update, it may be usefull to add a condition if the parser has reached the packet boundary:
https://github.com/airmash-refugees/airmash-frontend/blob/b19a3d611d3e1a37f7747168edb4f7a5076ecc68/src/js/Network.js#L551-L562