Protip: When using a redstone flying machine ride in a minecart. Make sure the minecart will never be on any part of a piston and you should be good to go. This should be lag-proof, and you will be able to relog safely.
TL;DR explanation:
Most people use boats with flying machines, this was fine until 1.9 changed how the positions of boats are processed. Since 1.9 the position of a boat with a player in is calculated by the client, and sent to the server (calculated clientside). Without lag all is well, but with server lag where the server thinks the boat is, vs. where the client thinks the boat is can desync. This makes it very easy for players in boats on flying machines to clip into blocks or whatever and fall through the blocks and off the machine.
The position of minecarts is always calculated serverside and sent to the client. Therefore even with lag minecarts can never clip into the blocks of a flying machine and fall through.