Don't try to update right after registering

This commit is contained in:
James R 2020-04-13 22:54:58 -07:00
parent eac7b2e060
commit bb8b279cd4

View file

@ -151,17 +151,21 @@ void RegisterServer(void)
else else
con_state = MSCS_FAILED; con_state = MSCS_FAILED;
} }
time(&MSLastPing);
} }
static void UpdateServer(void) static void UpdateServer(void)
{ {
if (!( con_state == MSCS_REGISTERED && HMS_update() )) if (( con_state == MSCS_REGISTERED && HMS_update() ))
{
time(&MSLastPing);
}
else
{ {
con_state = MSCS_FAILED; con_state = MSCS_FAILED;
RegisterServer(); RegisterServer();
} }
time(&MSLastPing);
} }
static inline void SendPingToMasterServer(void) static inline void SendPingToMasterServer(void)