Warning: session_start(): open(/var/lib/php/sessions/sess_85fg5a054rc4smksj5cl1hlbn0, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
!7
static long timeout = 60000;
static long networkLatency = 10000;
sclass ConnectToServer extends DynBigNumber {
long count;
transient bool connected;
void start {
super.start();
thread "Connect" {
while licensed {
withMinTime(1000, r {
try {
S s = loadPageWithTimeout(butterBotURL(#1016548) + "/" + randomID() /* avoid spam block */ + hquery(+count), timeout+networkLatency);
if (s == null) setField(connected := false);
else {
setFields(connected := true, count := parseInt(s));
updateValue();
}
} catch e {
printShortException(e);
setField(connected := false);
updateValue();
}
});
}
}
}
void updateValue {
setValue(connected ? str(count) : "?");
}
}