The only way I've found to determine desync and imminent disconnection is to see if damage numbers stop showing during combat and if new items fail to update in your hotbar.
If either of these things happen, it means that you're desyncing with the server; at the very least you're going to hang/crash at the elevator, and most likely after some period of time you'll just lag out.
The network coding in this game is just bad; I enjoy the game but a fair amount of time I simply can't even try to play due to desync/disconnection issues.