Reading from sockets now times out after 24 minutes, fixing the
major bug when FonBot would stop responding to commands after
some time of not using it.
The other change in this commit is that ExecutableRunnables are retried
at each service ping.
longPollThread.start();
}
+ ExecutableRunnable.retryTasks();
+
final boolean runForeground=PreferenceManager.getDefaultSharedPreferences(this).getBoolean("foreground", false);
if(!runForeground)
stopForeground(true);
try {
final URL url=Utils.getServerURL(toNonNull(context),toNonNull(path));
final HttpURLConnection conn=(HttpURLConnection) url.openConnection();
+ conn.setReadTimeout(24*60*1000);//24 minutes
if(data!=null){
conn.setDoOutput(true);
conn.setFixedLengthStreamingMode(data.length);