Skip to content
Snippets Groups Projects
Commit a8825b8a authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Add more paranoia.

This is a suitable amount of paranoia now.
parent 2a76ffdf
No related branches found
No related tags found
No related merge requests found
Pipeline #7124 passed
...@@ -1409,11 +1409,16 @@ function open_cfg(usr) ...@@ -1409,11 +1409,16 @@ function open_cfg(usr)
function lock_cfg() function lock_cfg()
{ {
start = time();
while(!cfgfile.lock(0, 1)) { while(!cfgfile.lock(0, 1)) {
if (!client.socket.is_connected) if (!client.socket.is_connected)
exit(0); exit(0);
if (js.termianted) if (js.termianted)
exit(0); exit(0);
if ((time() - start) > 45) {
log(LOG_ERR, "Timed out waiting 45 seconds for IMAP log.");
exit(0);
}
mswait(10); mswait(10);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment