Bug Fix: Don't let connection issues get you down lil' Shmeppy

I mentioned in Are your changes saved? Welcome to the new and improved Network Box ✨ that I found a bug when I released that change. I’ve now fixed it :tada:.

Previously if your internet connection dropped and you made a change to a map before your browser realized that it was no longer connected to Shmeppy’s server, you could get into a state where your browser has sent some of your changes to Shmeppy’s server but Shmeppy’s server never received it.

In other words, the sequence of events might look like:

  1. your working on your map,
  2. your roommate pulls the plug on your router to restart it,
  3. Shmeppy still shows “connected” because no one has told it it’s connection is gone,
  4. you make some more changes to your map,
  5. Shmeppy reports that its “saving” and sends the changes to the server,
  6. the router is off so you changes just get yelled into the void,
  7. Shmeppy realizes the server hasn’t responded to any of its pings in a little bit and discovers the connection is broken,
  8. Shmeppy reports that it’s trying to reconnect,
  9. your router comes back online,
  10. Shmeppy reports that it’s connected again, and that it’s still saving the changes you made while your router was off,

Now that Shmeppy is reconnected, you’d think it would try to resend those changes that got lost when the router was disconnected. But it didn’t.

Instead it would say that it was trying to save those changes forever, but never actually resend them.

I’ve fixed this now, so Shmeppy will resend the changes upon reconnection.

Happy Shmepping ya’ll!